Giter Club home page Giter Club logo

004.55_markdown-cli-evaluation's Introduction

A comparative evalution of open source CLI Markdown processors: discount markdown, hoedown, multimarkdown and pandoc.

View the markdown test page at md_evaluation/md_evaluation.md.

Contents

ObjectivesProcessObservationsResources

Objectives

  1. Markdown Syntax. Find, to the extent possible, a common set of markdown syntax including certain extensions.
  2. CLI Settings. Find settings which produce the most similar markdown output.
  3. Extension Support. Evaluate extension support for footnotes, piped tables, fenced code, and LaTeX math.

Process

  1. Install 'multimarkdown' (which installs as markdown), 'hoedown', and 'pandoc' as command line tools.

    • Uninstall 'multimarkdown' (brew uninstall multimarkdown) and install 'discount' (which installs as markdown) to run tests for discount.
  2. Review/Edit source markdown file "md_evaluation.md".

  3. Review "test.sh". Edit options as needed. Run ./test.sh.

  4. Compare output. The a and b versions allow comparison what output changed for some settings change for the same CLI tool. The txt and html allows for comparison of raw output and how the output renders in a browser.

Note: Discount and MultiMarkdown have install conflicting execution binaries named markdown. Thus, Discount markdown and MultiMarkdown markdown are mutually exclusive brew installs. However, Discount markdown can be manually installed somewhere not on $PATH and scripted with /FULL/PATH/TO/markdown.

Observations

The source document md_evaluation.md evolved and evolves to contain details on common syntax and notes on various markdown feature.

Some of the major findings are noted here below.

LaTeX demarkation syntax

$, $$ \\(, \\[ \(, \[
raw html
discount markdown
hoedown
multimarkdown
pandoc

Note: Use of \(, \[ single escape syntax disallows escaping ( and [ for other purposes. hoedown does not have expressly enable/disbale control over dollar sign $ vs. double backslash \\ syntax. pandoc can expressly enable/disable each of the three syntax.

discount markdown

  • html fenced code. discount markdown fenced html with ∼∼∼ html does not generate a useable code block. Angle brackets are not converted to html entities. The enclosing <pre><code> tags are not produced. Workaround Options: (1) fence the html with ∼∼∼ markup or (2) write an html codeblock as raw html in the markdown file.

hoedown

  • C Library. MacDown uses hoedown C library when rendering markdown.
  • LaTeX guessing. --math option alone can produce incorrect and unexpected output. The combination of --math and --math-explicit did produce predictable, reliable results in these tests.

multimarkdown

  • C Library

pandoc

  • Options. Pandoc has the largest set of enable/disable options. see PandocMarkdownOptions.md
  • <pre><code> Pandoc generates <pre class="markdown"><code> instead of <pre><code class="language-markdown">.

Resources

CommonMark

Note: CommonMark Spec ⇗ does not mention any support for LaTeX math.

MultiMarkdown

004.55_markdown-cli-evaluation's People

Contributors

marc-medley avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

working-name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.