2 stable releases
new 1.0.1 | Dec 13, 2024 |
---|---|
1.0.0 | Sep 12, 2024 |
#2387 in Parser implementations
624 downloads per month
15KB
114 lines
markdown-it-ruby.rs
A markdown-it
plugin to process ruby text.
To load the plugin:
let mut parser = markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(&mut parser);
markdown_it_ruby::add(&mut parser);
let html = parser.parse("{漢|Kan}{字|ji}").xrender();
assert_eq!(html, String::from("<p><ruby>漢<rp>(</rp><rt>Kan</rt><rp>)</rp></ruby><ruby>字<rp>(</rp><rt>ji</rt><rp>)</rp></ruby></p>\n"));
lib.rs
:
A markdown-it
plugin to process ruby text.
To load the plugin:
let mut parser = markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(&mut parser);
markdown_it_ruby::add(&mut parser);
let html = parser.parse("{漢|Kan}{字|ji}").xrender();
assert_eq!(html, String::from("<p><ruby>漢<rp>(</rp><rt>Kan</rt><rp>)</rp></ruby><ruby>字<rp>(</rp><rt>ji</rt><rp>)</rp></ruby></p>\n"));
Dependencies
~6–14MB
~199K SLoC