This document intentionally exercises the rendered syntax surface of GitHub Flavored Markdown. It includes CommonMark leaf blocks, container blocks, inline syntax, and the GFM extensions for tables, task list items, strikethrough, autolinks, and raw HTML filtering.
Adjacent lines in one paragraph stay in one rendered paragraph unless a blank line separates them. This next line uses a backslash hard break.\ This line follows the backslash hard break.
Backslash escapes render punctuation literally: *not emphasis*, [not a link], # not a heading, and `not code`.
Character references render as characters: & < > " # đ.
This paragraph uses asterisk emphasis, underscore
emphasis, asterisk strong, underscore
strong, combined strong emphasis,
combined underscore strong emphasis, and
GFM strikethrough.
Intraword underscores should stay literal in snake_case_identifier, while intraword emphasis can still appear as foobarbaz.
Use inline code, code with ` one backtick,
and spaced code span inside normal prose.
Four leading spaces create an indented code block.
Markdown syntax like **strong** stays literal here.
<?php
function render_packet(array $items): string
{
return implode("\n", array_map('strtoupper', $items));
}const rows = ["tables", "tasks", "autolinks"];
console.log(rows.map((row) => row.toUpperCase()).join(", "));Fence length can contain shorter fences:
```
not the end of this block
```
flowchart LR
markdown_github --> parser
parser --> html
parser --> wordpress
A block quote can contain a paragraph with inline formatting.
- A list inside a quote
- A second item with
codeNested quotes should remain nested.
Note
GitHub alert syntax should render as a callout-style block when supported.
Tip
Alerts can include links and formatting.
Important
Important callouts should survive as quoted content even without native alert blocks.
Warning
Warning callouts exercise another alert label.
Caution
Caution callouts complete the GitHub alert set.
Ordered item one
Ordered item two
codeOrdered item three
Ordered lists can start at a non-one number.
The next marker should continue the list.
Loose unordered item with a paragraph.
Continuation paragraph in the same list item.
Second loose item with a nested quote.
Quote inside a loose list item.
Loose ordered item with a paragraph.
Continuation paragraph in the ordered item.
Second loose ordered item.
| Feature | Rendered example | Alignment |
|---|---|---|
| Bold | This is bold text | left |
| Italic | This text is italicized | center |
| Strikethrough | right | |
| Inline code | git status --short |
code |
| Link | OpenAI | link |
| Escaped pipe | a \| b |
cell |
| Entity | Š 2026 | entity |
| Short header | Extra body cell |
|---|---|
| Missing body cell | |
| Body | cells |
Inline link: OpenAI.
Reference link: GitHub Flavored Markdown spec.
Collapsed reference link: CommonMark.
Shortcut reference link: GitHub Docs.
Reference labels can be reused with different casing: gfm.
Autolink URI: https://github.github.com/gfm/.
Autolink email: support@github.com.
Bare GFM autolinks: https://github.com/openai, http://example.com/a_(b), www.github.com, and user@example.com.
Issue-like and mention-like tokens should remain visible: #42, GH-123, @octocat, and @github/docs.
Inline image:

Reference image:
![]()
| HTML table head | Value |
|---|---|
| Inline HTML strong | 42 |
Inline HTML appears in prose: Ctrl + K, subscript, superscript, and span text.
Disallowed raw HTML tags should be escaped or filtered by a GFM-safe renderer:
Footnotes should stay connected to their references.1
Emoji shortcodes such as đ, â¤ī¸, đ, and :octocat: should remain visible for GitHub-style rendering.
Inline math uses dollar delimiters when enabled: $E = mc^2$.
Block math:
$$ \int_0^1 x^2,dx = \frac{1}{3} $$
{
"type": "Point",
"coordinates": [-122.4194, 37.7749]
}{
"type": "Topology",
"objects": {},
"arcs": []
}
solid cube
endsolid cube
Footnote bodies can include formatting,
links, code, and lists.
This indented line remains part of the footnote.âŠī¸