A formal spec for GitHub Flavored Markdown
Mar 14, 2017GitHub Engineering9 min read
GitHub Flavored Markdown Specification and Implementation#Markdown Parsing#CommonMark#AST Generation
What the post covers
This post introduces the formal specification for GitHub Flavored Markdown (GFM), based on CommonMark, and details the migration of GitHub's backend Markdown parsing to `cmark`, the CommonMark reference implementation.
- It covers the implementation of GFM-specific extensions (tables, strikethrough, autolinks, task lists) on top of `cmark`, performance and security contributions to the upstream `cmark` project, and a pragmatic migration strategy involving normalization of existing user content to ensure visual consistency and data integrity.
- The new system generates an Abstract Syntax Tree (AST) for more robust processing.