Skip to content

MarkdownUI 0.5.0

Compare
Choose a tag to compare
@gonzalezreal gonzalezreal released this 25 Feb 22:21
· 176 commits to main since this release
cae6f69

Breaking change

MarkdownStyle is now a protocol with a default implementation DefaultMarkdownStyle. This new protocol has methods to customise the attributes of each of the different blocks and inlines in a markdown file.

To customise the font, foreground color, code font or heading font sizes you can use the markdownStyle(_:) view modifier:

Markdown(
    #"""
    ## Inline code
    If you have inline code blocks, wrap them in backticks: `var example = true`.
    """#
)
.markdownStyle(
    DefaultMarkdownStyle(
        font: .system(.body, design: .serif),
        codeFontName: "Menlo",
        codeFontSizeMultiple: 0.88
    )
)