Module markdown_it::plugins
source · Expand description
Ready-to-use plugins. Everything, including basic markdown syntax, is a plugin.
This library is made to be as extensible as possible. In order to ensure that
you can write your own markdown syntax of any arbitrary complexity,
CommonMark syntax itself is made into a plugin (cmark
), which you can use
as an example of how to write your own.
Add each plugin you need by invoking add
function like this:
let md = &mut markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(md);
markdown_it::plugins::extra::add(md);
markdown_it::plugins::html::add(md);
markdown_it::plugins::sourcepos::add(md);
// ...
Modules
- Basic markdown syntax, you probably want to add this.
- Frequently used markdown extensions and stuff from GFM.
- Raw html syntax (block and inline), part of CommonMark standard.
- Add source mapping to resulting HTML, looks like this:
<stuff data-sourcepos="1:1-2:3">
.