markdown-it-sub

Crates.iomarkdown-it-sub
lib.rsmarkdown-it-sub
version1.0.0
sourcesrc
created_at2024-09-12 16:53:49.99554
updated_at2024-09-12 16:53:49.99554
descriptionA markdown-it plugin for parsing subscripts
homepage
repositoryhttps://github.com/LemmyNet/lemmy-markdown-it-plugins
max_upload_size
id1372950
size39,439
(SleeplessOne1917)

documentation

README

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");
Commit count: 0

cargo fmt