Leading and trailing white spaces in code blocks

release-1.0

#21

Babelmark 3 report

Implementations that strip all leading and trailing spaces inside backtick spans and collapse internal runs of spaces (i.e. behavior currently specified by Commonmark):

  • commonmark.js
  • GitHub Flavored Markdown
  • league/commonmark
  • markdig
  • markdown-it

Implementations that strip all leading and trailing spaces inside backtick spans and keep internal runs of spaces:

  • blackfriday
  • cheapskate
  • DFM
  • earmark
  • markdown101
  • markdown102
  • MD4C
  • multimarkdown
  • pandoc
  • parsedown
  • php-markdown-extra
  • php-markdown
  • python-markdown
  • redcarpet
  • s9e/TextFormatter

Implementations that keep all leading and trailing spaces inside backtick spans and keep internal runs of spaces:

  • Cebe
  • Gambas
  • kramdown
  • Maruku

Implementations that trim one leading or trailing space inside backtick spans and keep internal runs of spaces (i.e. closest to desired behavior):

  • lunamark
  • rdiscount