2 stable releases

new 1.0.1 Dec 13, 2024
1.0.0 Sep 12, 2024

#2387 in Parser implementations

Download history 96/week @ 2024-09-07 44/week @ 2024-09-14 10/week @ 2024-09-21 8/week @ 2024-09-28 1/week @ 2024-10-05 2/week @ 2024-10-12 12/week @ 2024-10-19 178/week @ 2024-10-26 219/week @ 2024-11-02 217/week @ 2024-11-09 164/week @ 2024-11-16 193/week @ 2024-11-23 115/week @ 2024-11-30 109/week @ 2024-12-07

624 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

~6–14MB
~199K SLoC