Markdown Flavors: GFM, CommonMark, MDX
Compare Markdown dialects — GitHub Flavored, CommonMark, MultiMarkdown, and MDX — with feature charts.
Published:
Tags: Markdown flavors comparison, GFM CommonMark MDX comparison, Markdown dialects
Markdown Flavors: GFM, CommonMark, MDX Markdown's original 2004 specification left many common formatting cases undefined. Each major platform implemented the gaps differently, creating a family of dialects that share a common core but diverge on tables, code blocks, and inline HTML. Over 25 major Markdown dialect implementations exist, including CommonMark (2014 standardization) according to CommonMark specification, GitHub Flavored Markdown (2017), and MultiMarkdown. --- What is the origin problem: why flavors exist? John Gruber's original Markdown specification was intentionally loose — it defined Markdown as a lightweight writing format without covering every edge case. When platforms like GitHub, Stack Overflow, and Reddit needed features like tables and syntax-highlighted code…
Frequently Asked Questions
What are the different Markdown flavors?
The main Markdown flavors are original Markdown (Gruber 2004), CommonMark (standardised spec), GitHub Flavored Markdown (GFM), MultiMarkdown (extended for academic writing), Pandoc Markdown (extended for document conversion), and MDX (Markdown with embedded JSX). Each adds features the original spec lacked, but with different syntax choices for the same features.
What is the difference between CommonMark and GFM?
CommonMark is a strict, unambiguous specification that standardises the original Markdown. GFM extends CommonMark with GitHub-specific features: tables, strikethrough, task lists, and autolinks for mentions and issue references. GFM is a proper superset of CommonMark — every valid CommonMark document is valid GFM.
What is MDX?
MDX is Markdown with embedded JSX, primarily used in React documentation sites (Next.js, Docusaurus, Astro). It lets you import React components and use them inline within Markdown content. MDX is processed at build time — JSX expressions are compiled to JavaScript. It's not for general-purpose Markdown; it targets documentation systems built on React.
What Markdown features are unique to GitHub?
GitHub's Markdown rendering adds: @mention autolinks (links to GitHub user profiles), #number autolinks (links to issues/PRs), SHA autolinks (links to commits), emoji shortcodes (:thumbsup:), collapsed sections via <details> HTML, mermaid diagrams (in newer GitHub Markdown), and mathematical equations via LaTeX syntax ($...$ and $...$).
What is Pandoc Markdown?
Pandoc Markdown extends CommonMark with features for academic and professional document writing: footnotes, citations, definition lists, line blocks, header attributes, fenced divs and spans, raw LaTeX/HTML passthrough, and custom metadata blocks. Pandoc can convert Pandoc Markdown to PDF (via LaTeX), Word, HTML, ePub, and dozens of other formats.
All articles · theproductguy.in