Skip to content

0.10.0 — Extension seam

Choose a tag to compare

@luca-chen198 luca-chen198 released this 15 Jul 16:22

The extension seam: constructs beyond CommonMark are now opt-in extensions instead of core grammar. Add your own delimited span or fenced block in one file, with no changes to the parser, styler, or renderer.

Warning

Breaking — and silent. ==highlight== and ~~strikethrough~~ are no longer built into the core grammar. Your code still compiles, but unregistered these markers now render as literal text. To keep the previous behavior:

configuration.extensions = [HighlightExtension(), StrikethroughExtension()]

Added

  • Extension seam — a MarkdownExtension contributes an inline span (==text==), a fenced block (::: … :::), or both, plus content attributes and an HTML wrapper for clean copy. Register via MarkdownEditorConfiguration.extensions. Extensions never emit ranges — the parser derives all geometry — so a misbehaving extension can at worst restyle its own construct, never a neighbor. Built-in constructs always classify first. All parse caches key on the registry fingerprint, so the registered set can change at runtime.
  • HighlightExtension (==text==) and StrikethroughExtension (~~text~~) — the former built-ins, now opt-in.
  • ContainerExtension (::: … :::) — the first fenced block extension, and the template for your own.

Changed

  • Breaking: ==highlight== / ~~strikethrough~~ moved out of the core grammar into opt-in extensions (see the warning above).

Fixed

  • A pre-existing incremental-parse gap surfaced by the seam review: backspace-joining two paragraphs could leave transiently wrong styling (extra spacing or a stray emphasis span across the join) until the next edit.

Contributors

  • Extension seam — inline + fenced-block extensions, ==highlight==/~~strikethrough~~ extracted, incremental-parse fix — by @luca-chen198

Full Changelog: 0.9.0...0.10.0