1 stable release
1.0.0 | Sep 12, 2024 |
---|
#2364 in Parser implementations
547 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–15MB
~202K SLoC