Markdown Conformance
Lanexio Parser’s Markdown parser passes 100% of CommonMark 0.31.2 tests and 100% of GFM tests.
Serializer roundtrip
Section titled “Serializer roundtrip”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.
| Phase | Features | Tests |
|---|---|---|
| MD-S1 | Leaf blocks (thematic breaks, code blocks, HTML) | 1,841 |
| MD-S2 | Headings, paragraphs, inline formatting | 1,864 |
| MD-S3 | Links, images, blockquotes, lists | 1,880 |
| MD-S4 | GFM tables, character escaping, golden roundtrip | 1,898 |
Test suite results
Section titled “Test suite results”| Suite | Tests | Passed | Failed |
|---|---|---|---|
| CommonMark 0.31.2 | 652 | 652 | 0 |
| GitHub Flavored Markdown | 648 | 648 | 0 |
| Total | 1,300 | 1,300 | 0 |
The full results and per-section breakdown are in docs/MARKDOWN_GAPS.md in the repository.
CommonMark spec coverage
Section titled “CommonMark spec coverage”All 652 CommonMark 0.31.2 spec examples pass. Covered sections include:
| Section | Examples |
|---|---|
| Thematic breaks | 19 |
| ATX headings | 16 |
| Setext headings | 26 |
| Indented code blocks | 12 |
| Fenced code blocks | 29 |
| HTML blocks | 44 |
| Link reference definitions | 27 |
| Paragraphs | 8 |
| Block quotes | 25 |
| List items | 48 |
| Lists | 26 |
| Backslash escapes | 13 |
| Entity references | 12 |
| Code spans | 17 |
| Emphasis and strong emphasis | 131 |
| Links | 68 |
| Images | 22 |
| Autolinks | 19 |
| Raw HTML | 21 |
| Hard line breaks | 15 |
| Soft line breaks | 2 |
| Textual content | 1 |
GFM spec coverage
Section titled “GFM spec coverage”All 648 GFM-specific examples pass. GFM extensions covered:
| Extension | Status |
|---|---|
| Tables | Implemented |
| Task list items | Implemented |
| Strikethrough | Implemented |
| Autolinks (extended) | Implemented |
| Disallowed raw HTML | Implemented |
GFM is default
Section titled “GFM is default”GFM extensions are enabled by default in parseMarkdown. Pass { gfm: false } for strict CommonMark-only parsing.
Spec references
Section titled “Spec references”CommonMark 0.31.2 specification
RAG: commonmark_docs::spec@0.31.2
GitHub Flavored Markdown specification
RAG: gfm_docs::spec@gfm-0.29.0