Breaking Changes
- Raised minimum deployment targets to macOS 13, iOS 16, tvOS 16, watchOS 9, and visionOS 1.
- Removed
MarkdownViewStyleandmarkdownViewStyle(_:). - Removed
MarkdownContentfrom the public rendering API. Pass markdown strings directly toMarkdownViewandMarkdownText, or useMarkdownReaderto share a parsed result. - Removed
MarkdownView(_ url: URL)andMarkdownReader(_ url: URL, contents:). Load the file content first, then initialize the view with the markdown string. - Updated
MarkdownReaderto passMarkdownParseResultinto its content builder, andMarkdownViewnow acceptsMarkdownParseResultdirectly. - Renamed
MarkdownTableOfContenttoMarkdownTableOfContentReader, and its content builder now uses[Markdown.Heading]. - Changed
MarkdownTableStyleConfiguration.Table.fallbackto a deprecated empty compatibility view. Custom table styles should now be built fromconfiguration.table,configuration.table.header, andconfiguration.table.rows. - Updated
MarkdownFontGroupto useCustomCTFontConvertiblevalues.
New Features
- Added
MarkdownTextfor continuous text selection on iOS and macOS. - Added
CustomCTFontConvertiblesupport for component font configuration, including platform fonts andCTFont. - Added
StreamingMarkdownReaderandStreamingMarkdownSourcefor efficient streaming markdown rendering with incremental parsing. - Added
markdownLinksUnderlined(_:)to control link underline styling. - Added
MarkdownTableOfContentReadersupport for generating a table of contents from a markdown string,Markdown.Document, orMarkdownParseResult, plus addedEquatableto improve SwiftUI rendering performance (requires manual opt-in).
Default Styles
- Polished default code block style
- Polished default table style
Dependencies
- Added
RichText - Replace
LateXSwiftUIwithSwiftMath - Updated
swift-markdownto0.8.0 - Updated
Highlightrto2.3.0
For more information about this major release, see MarkdownView 3 Release Note