// Adds three custom plugins and runs them. mod block_rule; mod core_rule; mod inline_rule; fn main() { // create markdown parser let md = &mut markdown_it::MarkdownIt::new(); // add commonmark syntax, you almost always want to do that markdown_it::plugins::cmark::add(md); // add custom three rules described above inline_rule::add(md); block_rule::add(md); core_rule::add(md); // and now you can use it let html = md.parse(r#" (\/) hello world (\/) (\/)-------------(\/) "#).render(); print!("{html}"); assert_eq!(html.trim(), r#"

🦀 hello world 🦀

"#.trim()); }