Difference between Markdown and Discount

Discount is a C implementation of Markdown, and Markdown a text-to-HTML converter written in Perl. They are pretty similar but different in the following behaviours

  • Discount will replace double quote "" with “” and single and double quote ' with . Where Markdown will keep the single and double quote as-is.
  • To have a second level indentation on bullet points, Discount require two spaces, where Markdown only require one.

Double-quote and single quote

Discount will replace double and single quote and try to make it pretty

Markdown – HTML in a browser

"I'd like to thank you for what you did for me."

Discount – HTML in a browser

“I’d like to thank you for what you did for me.”

Discount – HTML source

“I’d like to thank you for what you did for me.”

Bullet point indentation

Markdown requires only one space for multi-level indentation.

* Item 1
 * Item 1.1
* Item 2

Discount requires at least two spaces for multi-level indentation, otherwise, it will be treated as a single level.

* Item 1
  * Item 1.1
* Item 2

Appendix

The test was done on the Ubuntu 18.04 (bionic) with the following version installed.

Markdown 1.0.1 by John Gruber

||/ Name                Version    Architecture  Description
+++-===================-==========-=============-==============================================================
ii  markdown            1.0.1-10   all           Text-to-HTML conversion tool

Discount 2.2.3 by David Parsons

||/ Name                Version    Architecture  Description
+++-===================-==========-=============-==============================================================
ii  discount            2.2.3b8-2  amd64         implementation of the Markdown markup language in C
ii  libmarkdown2:amd64  2.2.3b8-2  amd64         implementation of the Markdown markup language in C (library)

Leave a Reply

Your email address will not be published. Required fields are marked *