# commonmark-vs-gfm renderer matrix

Reproducible feature-detection across six Markdown renderers, used in
`content/blog/{ja,en,es,pt}/commonmark-vs-gfm.md` for the "Which GFM extensions
are on by default?" matrix.

## What it measures

A single sample (`sample.md`) containing a pipe table, `~~strike~~`,
`~tilde~` (single-tilde), a task list `- [ ]`, a bare URL, and a footnote
reference `[^1]`, rendered through:

1. commonmark.js 0.31.2 (reference CommonMark implementation)
2. marked 18.0.5 (default settings)
3. markdown-it 14.2.0 (default preset)
4. remark 15.0.1 + remark-rehype (no GFM plugin)
5. remark 15.0.1 + remark-gfm 4.0.1 + remark-rehype
6. GitHub Markdown API (https://api.github.com/markdown, mode: "markdown")

Each renderer's HTML output is inspected with simple feature detectors
(`<table>`, `<del>`, `<s>`, `<input type="checkbox">`, linkified `<a>`,
footnote `<section>` / `<sup>`) and the result is printed as a matrix.

## How to reproduce

```bash
cd scripts/benchmarks/commonmark-vs-gfm
npm install
node measure.mjs
```

The GitHub Markdown API call is unauthenticated by default. If you hit
rate limits, set `GITHUB_TOKEN=<your token>` before running.

## Measured results (2026-06-23)

| Renderer | Table | `~~strike~~` | `~tilde~` (single) | `- [ ]` task | bare URL | `[^1]` footnote |
| --- | --- | --- | --- | --- | --- | --- |
| commonmark.js 0.31.2 | pipes as text | literal `~~` | literal `~` | literal `[ ]` | literal URL | link-ref fallback |
| marked 18.0.5 (default) | `<table>` | `<del>` | `<del>` | `<input type="checkbox">` | linkified | link-ref fallback |
| markdown-it 14.2.0 (default) | `<table>` | `<s>` | literal `~` | literal `[ ]` | literal URL | link-ref fallback |
| remark 15.0.1 (no plugins) | pipes as text | literal `~~` | literal `~` | literal `[ ]` | literal URL | link-ref fallback |
| remark 15.0.1 + remark-gfm 4.0.1 | `<table>` | `<del>` | `<del>` | `<input type="checkbox">` | linkified | rendered as footnote |
| GitHub Markdown API (markdown mode) | `<table>` | `<del>` | `<del>` | literal `[ ]` | linkified | rendered as footnote |

"link-ref fallback" means the footnote-definition syntax `[^1]: ...` is
re-interpreted as a link reference definition, so `text[^1]` resolves to
`<a href="footnote">^1</a>` (silent rewrite) instead of either a footnote
or a syntax error.

## History

- 2026-06-23 — Created. Reproduces the matrix that already appeared in the
  article (claimed "tested 2026-06-13" but had no reproduction script).
  Re-running the script confirms the article's claims byte-for-byte for
  this sample.
