Semantic article header
W3C, Example Work,
inline quotation
,
, and
forty-two.
title: “Markdown renderer torture test” description: “CommonMark, GFM, extensions, raw HTML, math, and media” tags: [markdown, rendering, test]
This document deliberately mixes CommonMark, GitHub Flavored Markdown (GFM), renderer-specific extensions, LaTeX math, and raw HTML. Unsupported syntax should remain readable as source text rather than disappearing.
code, link, \(x^2\), and 😀const x = "#"code + strong + emphasis + code, and linkThe {#custom-heading-id} form is an extension and may render literally.
Plain text. Asterisk italic. Underscore italic. Asterisk bold.
Underscore bold. Bold italic. Also bold italic.
GFM strikethrough. Extension subscript. ^Extension superscript^.
==Extension highlight==. ++Extension insertion++. ||Spoiler extension||.
Nested: bold and italic and struck and code.
Overlapping delimiter stress: one two and one *two three*.
Intraword underscores should remain: snake_case_name and foobarbaz.
Raw HTML styles: bold, strong, italic,
emphasis, underline, strike, deleted,
inserted, highlighted, small,
H2O, x2, Ctrl+C,
sample output, and variable.
Combinations: marked bold italic underlined
and bold deleted with H2O and xn.
Inline code: printf("hello") and code containing a ` backtick.
Two trailing spaces create a hard break.
This line follows a hard break. A backslash also creates one.
This follows the backslash break.
This single newline is normally a soft break.
HTML entities: & < > " ' © ® ™ © 🚀.
Unicode: café, naïve, Ελληνικά, Русский, 日本語, 한국어, العربية, עברית, हिन्दी, 😀 🚀 🧪. Combining characters: é versus é. RTL isolate: مرحبا بالعالم. Emoji shortcode extension: :rocket: :warning: :+1:.
Inline CSS style and custom attributes.
Inline link, link with title, relative link, fragment link, and encoded URL.
Reference link, numbered reference, collapsed reference, and shortcut-reference.
Autolinks: https://example.com/path?q=test and test@example.com. GFM autolinks: https://example.com and test@example.com.
Potential platform extensions: @octocat, #123, GH-123, and [[Wiki Link]].
Deterministic images use seeded picsum.photos URLs. Sizes range from tiny to
large and from extreme panoramas to extreme portraits.
Images inline: between
words and
at the end.


First ordered item
Second ordered item
Third ordered item
Ordered list starting at seven
Eight
Nine
1. Level 4 ordered
code, and link
Tight item one
Tight item two
Tight item three
Loose item one, first paragraph.
Loose item one, second paragraph with style.
A blockquote nested in a list.
The fenced-code variant of this list case is in codeblockstest.md.
| Nested | Table | |:–|–:| | left | right |
code, and a linkBefore the code.
package main
func main() {}
After the code.
A simple blockquote with bold, italic,
code, and a link.A second paragraph.
- A quoted list
- A nested ordered item
- Another item
Nested quote level two.
Nested quote level three with
strikeand \(x^2\).[!NOTE] GitHub-style note alert.
[!TIP] A tip with
inline code.[!IMPORTANT] Important content.
[!WARNING] Warning content.
[!CAUTION] Caution content.
!!! note “Admonition extension” This indented admonition form is used by some Markdown engines.
Four-space indented code:
<div class="not-rendered">Indented HTML-like code</div>
**Markdown is literal here.**
All fenced-code tests live in codeblockstest.md.
| Left | Center | Right | Default |
|---|---|---|---|
| bold | italic | code |
|
| link | \(x^2\) | mark | |
| H2O | x2 | Enter | 😀 |
| escaped | pipe | a \| b |
| entity | underline |
| bold italic | bold and code |
bold link |
| Empty left | Empty right | Number | Decimal | Boolean | Null-like |
|---|---|---|---|---|---|
| value | 1 | 3.14159 | true | null | |
| value | -42 | 0.0001 | false | NIL | |
| 1,000,000 | 6.022e23 | yes | N/A |
| Square | Landscape | Portrait | Panorama |
|---|---|---|---|
Standard pipe-table cells cannot portably contain block elements or fenced code. These alternatives test common renderer behavior:
| Technique | Content |
|---|---|
| HTML line break | first line second line third line |
| Inline code | const answer = 42; |
| Literal fence | ```js console.log(42) ``` |
| HTML preformatted block | |
| console.log(answer); |
Raw HTML table with a genuine block code cell:
| Kind | Rendered content |
|---|---|
| Code block | |
| Nested list |
|
| Image |
Math requires a renderer such as KaTeX or MathJax. Markdown emphasis generally does not apply inside LaTeX; use LaTeX styling commands instead.
Inline forms: \(E = mc^2\), (a^2 + b^2 = c^2), \(\frac{1}{2}\), \(\sqrt[n]{x}\), \(x_i^j\), and \(\mathbf{F} = m\vec{a}\).
Styled surrounding text: Einstein: \(E=mc^2\), Euler: \(e^{i\pi}+1=0\),
obsolete guess \(x=0\), and highlighted equation \(y=mx+b\).
LaTeX-internal styles: \(\mathbf{bold}\), \(\mathit{italic}\), \(\mathrm{roman}\), \(\mathsf{sans}\), \(\mathtt{mono}\), \(\mathcal{C}\), \(\mathbb{R}\), \(\boldsymbol{\alpha}\), and \(\color{red}{x^2}\).
Display equation with dollar delimiters:
\[ \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi} \]
Display equation with bracket delimiters:
[ \sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6} ]
Fractions, roots, limits, products, and integrals:
\[ \lim_{x\to 0}\frac{\sin x}{x}=1,\qquad \prod_{k=1}^{n}k=n!,\qquad \sqrt{\frac{-b\pm\sqrt{b^2-4ac}}{2a}} \]
Matrix:
\[ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \]
Cases:
\[ f(x)=\begin{cases} x^2, & x\ge 0, \\ -x, & x<0. \end{cases} \]
Aligned equations:
\[ \begin{aligned} (a+b)^2 &= a^2+2ab+b^2 \\ (a-b)^2 &= a^2-2ab+b^2 \\ (a+b)(a-b) &= a^2-b^2 \end{aligned} \]
Sets, logic, and Greek letters:
\[ \forall x\in\mathbb{R},\; \exists y\in\mathbb{R}: y>x \quad\land\quad \alpha+\beta+\gamma+\Delta+\Omega \]
Escaped currency versus math: The price is $5, while $x$ is literal code and
\(\\)x$ tests an escaped dollar inside math.
A simple footnote.[^simple] A named footnote with style, code, and a
link.[^styled] The same repeated footnote appears again.[^simple]
An inline footnote extension may look like this.^[Inline footnote content.]
Multiline footnote reference.[^multiline]
[^simple]: This is a simple footnote.
[^styled]: Footnote with bold, italic, strike, code, \(x^2\), and a link.
[^multiline]: First paragraph of a multiline footnote.
Second paragraph, indented beneath the footnote.
- A nested list item
- Another item with `code`
An indented code-like line inside a footnote.
Abbreviation extension: HTML and CSS are commonly used together.
*[HTML]: HyperText Markup Language *[CSS]: Cascading Style Sheets
Citation extension: Rendering research [@commonmark; @gfm].
codeA paragraph containing highlighting, H2O, x2, and a link.
W3C, Example Work,
inline quotation
,
, and
forty-two.
Ruby annotation: 漢字.
Progress:
Meter:
Keyboard sequence: Ctrl + Shift + P.
Description list:
An HTML blockquote.
Raw HTML preformatted text
preserves indentation
and whitespace.
فقرة عربية من اليمين إلى اليسار.
This content should not be visually displayed.
The document already begins with YAML front matter. TOML and JSON front matter cannot simultaneously serve as active metadata. Their fenced representations are in codeblockstest.md.
This is intentionally the final section so escaping failures cannot affect later tests.
! \” # $ \% & \’ ( ) * + \, - . \/ : \; < \= > \? \@ [ \ ] ^ _ ` { | } ~
Escaped Markdown examples: *not italic*, _not italic_, *not bold*,
# not a heading, [not a link](https://example.com), `not code`,
1. not a list, - not a list, and > not a quote.
Backslash runs: \ is inline code, \ is two source backslashes, and \* tests
odd/even escape behavior before an asterisk.
Escaped entities and URL characters: & \?query\=one&two #fragment \%20.
alpha beta gamma delta
Nested brackets: outer [inner text] still outer.
Nested parentheses in destination: parentheses.
Escaped destination: escaped paren.
Angle destination: spaces allowed in angle destination.
LTR then RTL: English before العربية after English.
Directional HTML: ABC אבג 123 XYZ.
CJK without spaces: 日本語の長い文章が改行と折り返しをテストします。
Combining marks: a̐ é ö̲ Z̬̥̮̺̫̖͑ͫ̓ͪ͆ͧ̚̕͘.
Zero-width stress between brackets (the middle pair contains a zero-width space):
[] versus [].
Very long unbroken token:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
Level 1
Level 2
Level 3
Level 4
Level 5
Level 6
Level 7
Level 8
Bold italic code strike link mark H2O x2 \(x^2\)
Escaped terminator stress at end of file: \ * _ # [ ] ( ) { } | ~ `