Crates.io | markdown-it-sub |
lib.rs | markdown-it-sub |
version | 1.0.0 |
source | src |
created_at | 2024-09-12 16:53:49.99554 |
updated_at | 2024-09-12 16:53:49.99554 |
description | A markdown-it plugin for parsing subscripts |
homepage | |
repository | https://github.com/LemmyNet/lemmy-markdown-it-plugins |
max_upload_size | |
id | 1372950 |
size | 39,439 |
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");