Skip to content

3.3.0

Choose a tag to compare

@chrisdhaan chrisdhaan released this 09 Jun 01:26
f989060

3.3.0

Released on 2026-06-07.

Added

  • Added cdMarkdownCodeLanguage attribute key. Applied to fenced code block ranges when a language hint is present (e.g. ```swift). Value is a String containing the language identifier exactly as written after the opening fence.
  • Added CDMarkdownLinkReference element for parsing reference-style links ([text][ref] with [ref]: url definitions). Reference definitions are stripped from the rendered output and resolved to .link attributes at parse time.
  • Added cdMarkdownLinkTitle attribute key for the optional title string from a reference link definition. Value is a String (without surrounding quotes or parentheses). Present only when the definition included a title.
  • Added CDMarkdownTheme struct for unified styling of all parser elements. Bundles font, color, and per-element overrides (HeaderTheme, InlineTheme, LinkTheme) into a single value.
  • Added CDMarkdownTheme.default and CDMarkdownTheme.systemDark static factory themes.
  • Added CDMarkdownParser.init(theme:) convenience initializer that configures the parser from a CDMarkdownTheme.
  • Added theme convenience initializers to CDMarkdownView and CDMarkdownText.
  • Added markdownTheme SwiftUI environment key and .markdownTheme(_:) view modifier so a theme can be injected into an entire view hierarchy.
  • Added iOS 17+ textView(_:primaryActionFor:defaultAction:) delegate method to CDMarkdownView.Coordinator for correct link-tap behaviour on visionOS and iOS 17+.

Fixed

  • Fixed reference link definitions inside fenced code blocks being incorrectly extracted as link definitions.
  • Fixed UITextItemInteraction deprecation warning on visionOS.
  • Fixed CDMarkdownText not re-parsing when the markdownTheme environment value changes.