Skip to content

pulldown-cmark-to-cmark 23 - #7

Merged
yaroslav merged 1 commit into
mainfrom
feature/pulldown-cmark-to-cmark-23
Oct 24, 2026
Merged

yaroslav merged 1 commit into
mainfrom
feature/pulldown-cmark-to-cmark-23

Conversation

@yaroslav

Copy link
Copy Markdown
Owner

Moves Markdown serialization to pulldown-cmark-to-cmark 23 and fixes the bugs its stricter round-trip checks exposed.

  • Breaking: Markdown output (to_markdown, chunks_by_heading, chunks_by_size, truncate_markdown) uses pulldown-cmark-to-cmark 23; escaping and formatting differ from 0.2.
  • Fix raw HTML leaking into Markdown output with raw_html: false when a line held more than one tag.
  • Fix chunks_by_size and truncate_markdown (at: :block) joining blocks without a blank line, which merged adjacent paragraphs.
  • Fix Markdown output crashing on an image nested in another image's alt text with images: { lazy: true }, allowed_hosts, or allowed_schemes.
  • chunks_by_heading starts sections only at top-level headings; a heading inside a block quote or list item no longer splits it.
  • Raise Inkmark::Error on Markdown serialization failures instead of crashing the process.

Verified with a differential run against 0.2.2: every Markdown-emitting API over the 652 CommonMark spec examples and the repo's Markdown documents, across 9 option sets (30,150 calls). No errors, and no raw HTML in output when raw_html: false (0.2.2: 260 cases).

@yaroslav
yaroslav merged commit dc847d0 into main Oct 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant