2 stable releases

1.0.1 Dec 13, 2024
1.0.0 Sep 12, 2024

#2732 in Parser implementations

Download history 11/week @ 2024-09-20 8/week @ 2024-09-27 2/week @ 2024-10-04 2/week @ 2024-10-11 9/week @ 2024-10-18 143/week @ 2024-10-25 227/week @ 2024-11-01 204/week @ 2024-11-08 175/week @ 2024-11-15 198/week @ 2024-11-22 139/week @ 2024-11-29 116/week @ 2024-12-06 306/week @ 2024-12-13 72/week @ 2024-12-20 75/week @ 2024-12-27 93/week @ 2025-01-03

583 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
~221K SLoC