2 stable releases
new 1.0.1 | Dec 13, 2024 |
---|---|
1.0.0 | Sep 12, 2024 |
#2677 in Parser implementations
750 downloads per month
15KB
markdown-it-sub.rs
A markdown-it
plugin to process subscript.
To load the plugin:
let mut parser = markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(&mut parser);
markdown_it_sub::add(&mut parser);
let html = parser.parse("log~2~(a)").xrender();
assert_eq!(html, "<p>log<sub>2</sub>(a)</p>\n");
lib.rs
:
A markdown-it
plugin to process subscript.
To load the plugin:
let mut parser = markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(&mut parser);
markdown_it_sub::add(&mut parser);
let html = parser.parse("log~2~(a)").xrender();
assert_eq!(html, "<p>log<sub>2</sub>(a)</p>\n");
Dependencies
~5–13MB
~190K SLoC