jonschlinkert / remarkable

Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
https://jonschlinkert.github.io/remarkable/demo/
MIT License
5.76k stars 372 forks source link

Support admonitions #281

Open nuest opened 7 years ago

nuest commented 7 years ago

I use a lot of admonitions (https://pythonhosted.org/Markdown/extensions/admonition.html) in my documentation, though, which come out quite literally with "!!! ..." when using https://github.com/alanshaw/markdown-pdf

image

From what I understand from the docs, a plugin could work to add support for admonitions, right?

Is this feasible?

doowb commented 7 years ago

From what I understand from the docs, a plugin could work to add support for admonitions, right?

That sounds correct. The only plugin that I've created so far is remarkable-mentions which looks for an inline token that has mentions in it and modifies them to a link. So it's basically just the parser piece.

From the looks of the syntax, you might be able to create the parser/render similar to indented code blocks or list items (I think the list items follow the same rules where they can have inner markdown elements and the indentation determines when they end)

leonardfactory commented 5 years ago

Really old question I know. I'm leaving it here just if someone comes here from search results: I've released a remarkable-admonitions plugin to add admonitions support (with ::: syntax similar to fenced code blocks)

mesqueeb commented 2 years ago

just so the issue gets picked up easier through search:

admonitions are also called "fenced divs"