Module 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_that::MarkdownThat::new();
markdown_that::plugins::cmark::add(md);
markdown_that::plugins::extra::add(md);
markdown_that::plugins::html::add(md);
markdown_that::plugins::sourcepos::add(md);
// ...

Modulesยง

cmark
Basic markdown syntax, you probably want to add this.
extra
Frequently used markdown extensions and stuff from GFM.
html
Raw html syntax (block and inline), part of CommonMark standard.
sourcepos
Add source mapping to resulting HTML, looks like this: <stuff data-sourcepos="1:1-2:3">.