1 stable release
1.0.0 | Sep 12, 2024 |
---|
#818 in Encoding
669 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–14MB
~194K SLoC