Crate markdown_it_tasklist
source ·Expand description
A markdown_it plugin for parsing tasklists
let parser = &mut markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(parser);
markdown_it_tasklist::add(parser);
let root = parser.parse("- [x] task");
let mut names = vec![];
root.walk(|node,_| { names.push(node.name()); });
assert_eq!(names, vec![
"markdown_it::parser::core::root::Root",
"markdown_it::plugins::cmark::block::list::BulletList",
"markdown_it::plugins::cmark::block::list::ListItem",
"markdown_it_tasklist::TodoCheckbox",
"markdown_it::parser::inline::builtin::skip_text::Text",
]);
Structs
Functions
- Add the tasklist plugin to the parser
- Add the tasklist plugin to the parser