#markdown-it #subscript #markdown

markdown-it-sub

A markdown-it plugin for parsing subscripts

1 stable release

1.0.0 Sep 12, 2024

#818 in Encoding

Download history 75/week @ 2024-09-06 66/week @ 2024-09-13 18/week @ 2024-09-20 13/week @ 2024-09-27 4/week @ 2024-10-04 5/week @ 2024-10-11 13/week @ 2024-10-18 187/week @ 2024-10-25 243/week @ 2024-11-01 224/week @ 2024-11-08

669 downloads per month

GPL-3.0 license

15KB

License Latest version Downloads for latest version

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