Skip to content

Markdown Conformance

Lanexio Parser’s Markdown parser passes 100% of CommonMark 0.31.2 tests and 100% of GFM tests.

The Markdown serializer (serializeMarkdown) was delivered in phases MD-S1 through MD-S4. CommonMark and GFM features roundtrip: parse → serialize → re-parse produces structurally equivalent trees, with two documented edge cases (line-start block triggers inside literal text, and continuation-line indentation under wide ordered markers — see the Markdown guide). The serializer is fully iterative and never throws, including on 50,000-level-deep nesting.

PhaseFeaturesTests
MD-S1Leaf blocks (thematic breaks, code blocks, HTML)1,841
MD-S2Headings, paragraphs, inline formatting1,864
MD-S3Links, images, blockquotes, lists1,880
MD-S4GFM tables, character escaping, golden roundtrip1,898
SuiteTestsPassedFailed
CommonMark 0.31.26526520
GitHub Flavored Markdown6486480
Total1,3001,3000

The full results and per-section breakdown are in docs/MARKDOWN_GAPS.md in the repository.

All 652 CommonMark 0.31.2 spec examples pass. Covered sections include:

SectionExamples
Thematic breaks19
ATX headings16
Setext headings26
Indented code blocks12
Fenced code blocks29
HTML blocks44
Link reference definitions27
Paragraphs8
Block quotes25
List items48
Lists26
Backslash escapes13
Entity references12
Code spans17
Emphasis and strong emphasis131
Links68
Images22
Autolinks19
Raw HTML21
Hard line breaks15
Soft line breaks2
Textual content1

All 648 GFM-specific examples pass. GFM extensions covered:

ExtensionStatus
TablesImplemented
Task list itemsImplemented
StrikethroughImplemented
Autolinks (extended)Implemented
Disallowed raw HTMLImplemented

GFM extensions are enabled by default in parseMarkdown. Pass { gfm: false } for strict CommonMark-only parsing.

CommonMark 0.31.2 specification
RAG: commonmark_docs::spec@0.31.2

GitHub Flavored Markdown specification
RAG: gfm_docs::spec@gfm-0.29.0