GitHub Flavored Markdown full syntax packet

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.

Setext heading level 1

Setext heading level 2

Paragraphs, breaks, and escapes

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: & < > " # 🚀.




Emphasis, strong emphasis, and strikethrough

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.

Code spans

Use inline code, code with ` one backtick, and spaced code span inside normal prose.

Indented and fenced code blocks

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

Block quotes

A block quote can contain a paragraph with inline formatting.

Nested 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.

Lists

  1. Ordered item one

  2. Ordered item two

    1. Nested ordered item
    2. Nested ordered item with code
  3. Ordered item three

  4. Ordered lists can start at a non-one number.

  5. The next marker should continue the list.

  1. Loose ordered item with a paragraph.

    Continuation paragraph in the ordered item.

  2. Second loose ordered item.

Task list items

Tables

FeatureRendered exampleAlignment
BoldThis is bold textleft
ItalicThis text is italicizedcenter
StrikethroughThis was mistaken textright
Inline codegit status --shortcode
LinkOpenAIlink
Escaped pipea \| bcell
Entity© 2026entity
Short headerExtra body cell
Missing body cell
Bodycells

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.

Images

Inline image:

GitHub mark

Reference image:

Octocat logo

Raw HTML blocks and inline HTML

Rendered details block

GitHub allows raw HTML islands such as collapsible details, and Markdown inside the block should remain inspectable.

HTML table headValue
Inline HTML strong42

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:

blocked noembed

blocked noframes

Footnotes, emoji, math, and diagrams used on GitHub

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=mc2E = mc^2.

Block math:

01x2dx=13\int_0^1 x^2\,dx = \frac{1}{3}

{
  "type": "Point",
  "coordinates": [-122.4194, 37.7749]
}
{
  "type": "Topology",
  "objects": {},
  "arcs": []
}
solid cube
endsolid cube
  1. Footnote bodies can include formatting, links, code, and lists.

    This indented line remains part of the footnote.

    Back