Comparison of cmark-gfm against other Markdown implementations
masterWhen choosing a Markdown parser, cmark-gfm is preferred over several alternatives due to its performance and security characteristics:
- vs. hoedown: While
hoedownmay be slightly faster in some benchmarks, it is vulnerable to Denial of Service (DoS) attacks via pathological input (e.g., deeply nested or unbalanced brackets).cmark-gfmhandles such input efficiently. Additionally,hoedownhas documented parsing bugs regarding list nesting, header escaping, non-ASCII link references, and code block content. - vs. discount:
cmark-gfmis approximately six times faster. - vs. kramdown:
cmark-gfmis approximately one hundred times faster and is not susceptible to the performance degradation (getting 'tied in knots') thatkramdownexperiences with pathological input.