Investigate Markdown renderers
Look into Node.js/JavaScript renderers for Markdown. An ideal MD renderer would also include a robust syntax highlighter and minimal dependencies.
https://twitter.com/getify/status/668919171334311938
Here's a quick list of several MD parsers out there.
-
marked - https://github.com/chjj/marked
- Summary: "A full-featured markdown parser and compiler, written in JavaScript. Built for speed."
- npm: https://www.npmjs.com/package/marked
- Last publish: 4 months ago
-
markdown-js - https://github.com/evilstreak/markdown-js
- Summary: "A Markdown parser for javascript"
- npm: N/A
- Last publish: 28 months (last non-beta tag on GitHub)
-
strapdown.js - http://strapdownjs.com/
- Summary: "Strapdown.js makes it embarrassingly simple to create elegant Markdown documents."
- npm: https://www.npmjs.com/package/strapdown
- Last publish: 10 months ago
-
Commonmark.js - https://github.com/jgm/commonmark.js
- Summary: "CommonMark parser and renderer in JavaScript"
- CommonMark is "[a] strongly specified, highly compatible implementation of Markdown" (http://commonmark.org/)
- npm: https://www.npmjs.com/package/commonmark
- Last publish: 2 weeks
-
Remarkable - https://github.com/jonschlinkert/remarkable
- Summary: "Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins are also available."
- npm: https://www.npmjs.com/package/remarkable
- Last publish: 1 week
@getify, I'd be happy to do some kind of feature comparison if there are specific features you require, desire, or would be nice to have.
Do you need/want/expect GFM?
Remarkable seems like a solid option. I played around with their demos and read through a bit of their docs and I like what I see so far. One of the things that's really attractive to me is it's extensions support. Assuming emdash used it, that would presumably let bloggers customize their authoring environment to fit their needs. For example, if a blogger commonly linked to Github projects they could create custom syntax to make that much easier/faster.
Yep, since we're building this on top of github, that's the most logical flavor of markdown to support by default.
Of course, if it was possible to make renderers pluggable so someone could swap in a different one with a different flavor, that'd be great.
BTW, github's API has a "render GFM" endpoint: https://developer.github.com/v3/markdown/ So that seems like at least a plausible option, just to roll our own usage on top of that API as the default.