Skip to content

Resources: Markdown (MD)

Chris Holdgraf edited this page Feb 10, 2020 · 3 revisions

A list of resources for markdown

Markdown Flavours

  1. markdown flavours documents various syntax options that are avaialable
  2. scholarlymarkdown - a new entrant worth a look

Markdown parsers in Python

Below is a list of markdown parsers in Python as well as some general pros and cons

  • Mistune

    • Speed: 3.99 ms ± 307 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
    • Pros
      • Faster
      • Extensible
      • Well-used
    • Cons
      • Not a disciplined parser (not "theoretically" sound)
      • Can't keep track of line numbers
  • Mistletoe

    • Speed: 5.92 ms ± 207 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
    • Pros
      • Fast-enough
      • Extensible
      • Well-designed
      • Commonmark-compliant
    • Cons
      • Not well-maintained anymore
  • Commonmark-py

    • Speed: 7.07 ms ± 556 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
    • Pros
      • Commonmark-compliant
      • Supported by RTD
    • Cons
      • Not extensible natively
  • Marko

    • Speed: 26.1 ms ± 2.92 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
    • Pros
      • Commonmark-compliant
      • A bit more well-maintained
    • Cons
      • Much slower
      • Not as well-used or known

Math

A useful survey of math syntax in markdown

  1. https://github.com/cben/mathdown/wiki/math-in-markdown

Resources for Specific Markdown Syntax

Commonmark (v0.29)

One official markdown specification is provided by Commonmark.

  1. specification
  2. reference implementation