This is a 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
)
)
This is a breaking change.
MarkdownStyle
is now a protocol with a default implementationDefaultMarkdownStyle
. 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: