reveal.js icon indicating copy to clipboard operation
reveal.js copied to clipboard

Using markdown-it instead of marked?

Open rauschma opened this issue 8 years ago • 7 comments

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.”)

rauschma avatar Jul 02 '17 12:07 rauschma

Additionally, markdown-it’s plugins are great; they provide lots of useful features: https://www.npmjs.com/browse/keyword/markdown-it-plugin

rauschma avatar Jul 02 '17 12:07 rauschma

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.

imagejan avatar Oct 31 '17 14:10 imagejan

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?

bnjmnt4n avatar Feb 06 '18 14:02 bnjmnt4n

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.

hakimel avatar Feb 08 '18 11:02 hakimel

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.

noraj avatar Feb 16 '19 14:02 noraj

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.

marcvangend avatar Feb 29 '20 12:02 marcvangend

VSCode Plugin seems to use markdown-it to render the markdown

https://github.com/evilz/vscode-reveal/blob/1d2e60fa73be495e5745a8f51e401aea039ad3b3/src/Markdown-it.ts

pinage404 avatar May 28 '23 21:05 pinage404