reveal.js
reveal.js copied to clipboard
Using markdown-it instead of marked?
This may not be technically feasible, but have you considered using markdown-it instead of marked?
Rationale – there are several things that marked can’t handle:
Escaping backticks via multiple backticks: `` `backticks` ``
Inside tables: `a | b`
* 2. Numbers after bullets (always changed to “1.”)
Additionally, markdown-it’s plugins are great; they provide lots of useful features: https://www.npmjs.com/browse/keyword/markdown-it-plugin
Also, it would be nice to have a more powerful markdown parser that allows adding css attributes with syntax like {.my-customclass} markdown paragraph to bring css into markdown when using reveal.js via reveal-md or gitpitch.com.
I think this would be a great idea: markdown-it allows more flexibility and has plugins as well. However I don't think any of the contributors have time to implement such a major change - which might also have significant impact to users' current presentations. @hakimel any opinions on this?
markdown-it looks like a great option. Would be nice to be able to drop our custom syntax for adding classes/attributes and replace it with a plugin. That said it doesn't seem like the benefit is strong enough to make it worth spending the time switching right now. Happy to re-evaluate this in the future though.
Markdown-it is more robust, flexible, has more options, more performant, support GRF, CommonMark, etc. I saw a lot of project switching from markred to markdown-it when, they understood most of the markdown parsing bug were coming from the buggy marked.
I would be interested in this if if means getting more control over the resulting html output. For instance, as far as I know I currently can't add a class attribute to a table.
VSCode Plugin seems to use markdown-it to render the markdown
https://github.com/evilz/vscode-reveal/blob/1d2e60fa73be495e5745a8f51e401aea039ad3b3/src/Markdown-it.ts