Skip to content

Releases

MarkdownUI 2.5.1 — iOS List Link Fix, Swift 6 Sendable & OSS Polish

Choose a tag to compare

@peter-maude-new peter-maude-new released this 24 Nov 10:39

MarkdownUI 2.5.1 is a maintenance, Swift 6 concurrency, and open-source polish release on top of 2.5.0 (ripulio/swift-markdown-ui, maintained by Ripul).

1-Line Upgrade from Upstream 2.4.1

.package(url: "https://github.com/ripulio/swift-markdown-ui", from: "2.5.1")

What's New in 2.5.1

  • iOS list link hit-testing fix: On iOS, SwiftUI's .textSelection(.enabled) expands each selectable Text responder by ±16 pt, which caused a following list item to eclipse links on the item above it. Lists containing a link above another item or sibling block now automatically disable .textSelection on that list on iOS (hasOccludedListLink), leaving prose, link-free lists, and trailing-link lists unchanged.
  • Swift 6 Sendable support: MarkdownContent (and its underlying BlockNode AST types) now conform to Sendable for clean background-actor parsing, and Theme conforms to @unchecked Sendable (incorporating upstream #351).
  • Upgraded Examples/BenchmarkApp: Measures attached UIWindow / NSWindow hosts across settle ticks and compares .chat, .basic, and .gitHub directly against a closure-based Legacy 2.4.1 baseline and plain SwiftUI.Text.
  • Expanded documentation & community files: Added Light/Dark Theme.chat Retina visuals, a new DocC ChatAndStreaming guide, ARCHITECTURE.md, CHANGELOG.md, CONTRIBUTING.md, updated GitHub issue templates, and fixed DocC typos (upstream #354).

MarkdownUI 2.5.0 — Single-Pass Layout, Theme.chat & 120 Hz Streaming

Choose a tag to compare

@peter-maude-new peter-maude-new released this 12 Nov 17:19

MarkdownUI 2.5.0 is an actively maintained, 100% source-compatible continuation of gonzalezreal/swift-markdown-ui (2.4.1) with single-pass native SwiftUI layout, zero post-mount scroll jumps, and 120 Hz AI/LLM token streaming.

1-Line Upgrade from 2.4.1

.package(url: "https://github.com/ripulio/swift-markdown-ui", from: "2.5.0")

Keep import MarkdownUI — all existing Theme, BlockStyle, and TextStyle APIs work unchanged.


Highlights

  • 3×–10× faster settled layout out of the box — Theme.basic, Theme.gitHub, and Theme.docC now use declarative block margins, headings, paragraphs, and list items, unlocking single-pass DirectBlockSequenceView + ParagraphStackLayout automatically with pixel and height parity against upstream 2.4.1 (and automatic fallback for custom .markdownBlockStyle(...) closures).
  • Measured on iPhone 15 Pro Max (400pt width) — Settled layout dropped from 28.9 ms → 4.6 ms on a rich AI reply, 22.8 ms → 3.5 ms on a 16-item bullet list, and 30.1 ms → 3.0 ms on a 15×3 GFM table.
  • New Theme.chat preset — Purpose-built for AI assistants and messaging UIs (Markdown(reply).markdownTheme(.chat)): compact single-pass prose, headered code cards, accented callout blockquotes, and viewport-aware horizontal-scrolling GFM tables (AdaptiveTableLayout + shape-batched borders and alternating stripes).
  • Zero scroll jumps & upstream bug fixes — Eliminates GeometryReader / PreferenceKey height corrections, fixes newline-heavy paragraph hangs (upstream #312), dropped whitespace after styled spans (#402), inline/mixed image rendering (#420 / #439), and preserves streaming child view state via structural markdownBlockPath identity.
  • Interactive Examples/BenchmarkApp — New iOS + macOS app with live latency runner, 120 Hz streaming simulator, and theme gallery.
  • DocC & CI modernized — Added .spi.yml for Swift Package Index DocC hosting and updated GitHub Actions CI to macos-15.