Devii · Frontend · 2026-04-06 · 6 min read

Share

CommonMark: A Standard Subset Of Markdown For Predictable Parsing

Why flavors diverge, what CommonMark specifies, and how it affects docs sites and CMS rendering.

**Markdown** was born as a write-friendly syntax; implementations diverged. **CommonMark** (`spec.commonmark.org`) is a formal specification with conformance tests so parsers render the same AST for the same input.

GitHub Flavored Markdown (GFM) adds tables, task lists, and strikethrough on top of CommonMark baseline behavior. Many static site generators pick a specific parser (remark, markdown-it, cmark-gfm).

Content pipeline planning
Content pipeline planning

Security note: Markdown renderers must sanitize HTML output to prevent XSS when content is user-supplied. Parsing and sanitization are separate concerns.

For APIs storing article bodies, document which flavor you accept and test edge cases (nested lists, indented code fences, autolinks).