1 stable release

1.0.0 Sep 12, 2024

#2591 in Parser implementations

Download history 136/week @ 2024-09-12 12/week @ 2024-09-19 8/week @ 2024-09-26 3/week @ 2024-10-03 1/week @ 2024-10-10 8/week @ 2024-10-17 108/week @ 2024-10-24 221/week @ 2024-10-31

338 downloads per month

GPL-3.0 license

15KB
114 lines

License Latest version Downloads for latest version

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

~7–15MB
~223K SLoC