5

I have been using robotskirt to convert/parse markdown docs from github into HTML docs. My setup allows me to fetch my repo from Github and parse all .md files into HTML strings so I can import it into my page builder.

Robotskirt is a Node.JS wrapper for the Sundown library which has been abandoned together with roboskirt. In roboskirt's issues people suggest to use hoedown instead.

Since I have to change I thought about asking about it here:

Do you have a recommendation for a "Markdown to HTML" parser that I can use in Node.js?

0

2 Answers 2

4

I found the alternative of Markdown parser for NodeJS. It is markdown-js.

Like description of that repository said, markdown-js is

Yet another Markdown parser, this time for JavaScript. There's a few options that precede this project but they all treat Markdown to HTML conversion as a single step process. You pass Markdown in and get HTML out, end of story. We had some pretty particular views on how the process should actually look, which include:

  • Producing well-formed HTML. This means that em and strong nesting is important, as is the ability to output as both HTML and XHTML
  • Having an intermediate representation to allow processing of parsed data (we in fact have two, both JsonML: a markdown tree and an HTML tree)
  • Being easily extensible to add new dialects without having to rewrite the entire parsing mechanics
  • Having a good test suite. The only test suites we could find tested massive blocks of input, and passing depended on outputting the HTML with exactly the same whitespace as the original implementation

taken from this source.

This node package only supports Node version >= 0.10.

You may point out how to test/perform parser from Markdown to HTML. I recommend to read the basic usage at here.

1

You could try out showdown.js: https://github.com/showdownjs/showdown

It supports use in node.js and has been tested in versions 0.8 and 0.10, according to the above link at the time of writing. It is a direct port of the Perl version of Markdown, according to the comments in the source code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.