Conformance
flowdown reads Markdown with its own parser. This page is what that parser is held to: every example of the specifications is run, and every piece of syntax below is drawn and looked for in the page. The page is written by a script, and the test suite fails when it no longer matches the code.
| Suite | Examples | Pass |
|---|---|---|
| CommonMark 0.31.2 | 652 | 652 |
| GitHub Flavored Markdown, the extensions | 22 | 22 |
| cmark-gfm's extension tests | 30 | 30 |
CommonMark
Every example of the specification, by section. The expected HTML is compared character for character.
| Section | Examples | Pass |
|---|---|---|
| Tabs | 11 | 11 |
| Backslash escapes | 13 | 13 |
| Entity and numeric character references | 17 | 17 |
| Precedence | 1 | 1 |
| Thematic breaks | 19 | 19 |
| ATX headings | 18 | 18 |
| Setext headings | 27 | 27 |
| Indented code blocks | 12 | 12 |
| Fenced code blocks | 29 | 29 |
| HTML blocks | 44 | 44 |
| Link reference definitions | 27 | 27 |
| Paragraphs | 8 | 8 |
| Blank lines | 1 | 1 |
| Block quotes | 25 | 25 |
| List items | 48 | 48 |
| Lists | 26 | 26 |
| Inlines | 1 | 1 |
| Code spans | 22 | 22 |
| Emphasis and strong emphasis | 132 | 132 |
| Links | 90 | 90 |
| Images | 22 | 22 |
| Autolinks | 19 | 19 |
| Raw HTML | 20 | 20 |
| Hard line breaks | 15 | 15 |
| Soft line breaks | 2 | 2 |
| Textual content | 3 | 3 |
| All | 652 | 652 |
GitHub Flavored Markdown
The examples of GitHub's specification that are about one of its extensions. (The rest of that document restates an older CommonMark, covered above at 0.31.2.) Task lists and footnotes have no examples there; cmark-gfm's own tests below cover them.
| Extension | Examples | Pass |
|---|---|---|
| Tables | 8 | 8 |
| Strikethrough | 2 | 2 |
| Autolinks | 11 | 11 |
| Disallowed raw HTML | 1 | 1 |
| All | 22 | 22 |
cmark-gfm is GitHub's parser; these are the tests it keeps for its extensions.
| Section | Examples | Pass |
|---|---|---|
| Tables | 6 | 6 |
| Table cell count mismatches | 2 | 2 |
| Embedded pipes | 1 | 1 |
| Oddly-formatted markers | 1 | 1 |
| Escaping | 1 | 1 |
| Embedded HTML | 1 | 1 |
| Reference-style links | 1 | 1 |
| Sequential cells | 1 | 1 |
| Interaction with emphasis | 1 | 1 |
| a table can be recognised when separated from a paragraph of text without an empty line | 1 | 1 |
| Strikethroughs | 2 | 2 |
| Autolinks | 3 | 3 |
| HTML tag filter | 1 | 1 |
| Footnotes | 1 | 1 |
| When a footnote is used multiple times, we insert multiple backrefs. | 1 | 1 |
| Footnote reference labels are href escaped | 1 | 1 |
| Interop | 2 | 2 |
| Task lists | 3 | 3 |
| All | 30 | 30 |
GitHub’s writing syntax
What Basic writing and formatting syntax lists, in its order. A dash is syntax that belongs to github.com (its users, issues and emoji), which a reply has no use for: it shows as written.
| Syntax | Supported | Note |
|---|---|---|
| Headings | ✓ | |
| Bold | ✓ | |
| Italic | ✓ | |
| Strikethrough | ✓ | |
| Bold with nested italic | ✓ | |
| All bold and italic | ✓ | |
| Subscript, superscript, underline | ✓ | raw HTML, sanitized |
| Quoting text | ✓ | |
| Quoting code | ✓ | |
Supported color models (a swatch beside #0969DA) | — | |
| Links | ✓ | |
| Bare URLs become links | ✓ | |
| Section links (heading ids) | ✓ | with headingIds |
| Custom anchors | ✓ | names are prefixed, as on GitHub |
Line breaks: two spaces, backslash, <br/> | ✓ | |
| Images | ✓ | |
The <picture> element | ✓ | |
| Lists | ✓ | |
| Nested lists | ✓ | |
| Task lists | ✓ | |
Mentioning people and teams (@octocat) | — | |
Referencing issues and pull requests (#12) | — | |
Emoji shortcodes (:+1:) | — | |
| Paragraphs | ✓ | |
| Footnotes | ✓ | |
| Alerts: note, tip, important, warning, caution | ✓ | |
| Hiding content with comments | ✓ | |
Ignoring Markdown formatting (\*) | ✓ |
From the advanced pages of the same guide:
| Syntax | Supported | Note |
|---|---|---|
| Tables, with column alignment | ✓ | |
Collapsed sections (<details>) | ✓ | raw HTML, sanitized |
| Fenced code blocks with a language | ✓ | |
Diagrams (```mermaid) | ✓ | drawn when mermaid is given |
Mathematical expressions: $…$, $$…$$, ```math | ✓ | with @localix/flowdown/math |
<kbd> keys | ✓ | raw HTML, sanitized |
The dialect
What flowdown draws beyond Markdown; Syntax describes each form. Every form is plain Markdown to any other renderer.
| Syntax | Supported | Note |
|---|---|---|
| Callout with a title | ✓ | |
| Steps | ✓ | |
| Tabs | ✓ | |
| Pros and cons | ✓ | |
| Stats | ✓ | |
| Details (a folded section) | ✓ | |
| Sources | ✓ | |
| Quote with its source | ✓ | |
| Figure with a caption | ✓ | |
| File tree | ✓ | |
| Code block with a file name | ✓ | |
| Diff | ✓ | colored with @localix/flowdown/highlight |
| Numbered sections | ✓ | |
| Diagram | ✓ | drawn when mermaid is given |
| Math | ✓ | with @localix/flowdown/math |