Skip to content

fix: do not directly specify inlineCode font size#578

Merged
mikepenz merged 1 commit into
mikepenz:developfrom
zxbmmmmmmmmm:fix/inline-code
Jun 16, 2026
Merged

fix: do not directly specify inlineCode font size#578
mikepenz merged 1 commit into
mikepenz:developfrom
zxbmmmmmmmmm:fix/inline-code

Conversation

@zxbmmmmmmmmm

@zxbmmmmmmmmm zxbmmmmmmmmm commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request updates the markdown typography configuration for both Material 2 and Material 3 Compose implementations to improve the handling of inline code styling. The main change is to explicitly set the font size of inline code elements to TextUnit.Unspecified, ensuring they inherit the surrounding text size rather than overriding it. This helps maintain consistent appearance in markdown rendering.

Before

31e27e734248a1ed6803f8975d75b520

After

45f35c7f6cccdbe0f6fb4dc8c0c70e92

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • ./gradlew :multiplatform-markdown-renderer:assemble
  • ./gradlew apiCheck

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copilot AI review requested due to automatic review settings June 10, 2026 14:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the default inlineCode typography in both Material 2 and Material 3 renderers so inline code does not force a specific font size when merged into surrounding text styles (e.g., headings).

Changes:

  • Set inlineCode fontSize to TextUnit.Unspecified while keeping monospace font family (M2 + M3).
  • Add TextUnit import required for the new default.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
multiplatform-markdown-renderer-m3/src/commonMain/kotlin/com/mikepenz/markdown/m3/MarkdownTypography.kt Adjusts M3 inline code style to avoid overriding surrounding font size.
multiplatform-markdown-renderer-m2/src/commonMain/kotlin/com/mikepenz/markdown/m2/MarkdownTypography.kt Adjusts M2 inline code style to avoid overriding surrounding font size.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mikepenz

Copy link
Copy Markdown
Owner

Thank you @zxbmmmmmmmmm for the contribution

@mikepenz mikepenz added the fix label Jun 16, 2026
@mikepenz mikepenz merged commit c3309fe into mikepenz:develop Jun 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants