Expand description
Plugin to parse footnote definitions
let parser = &mut markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(parser);
markdown_it_footnote::definitions::add(parser);
let root = parser.parse("[^label]: This is a footnote");
let mut names = vec![];
root.walk(|node,_| { names.push(node.name()); });
assert_eq!(names, vec![
"markdown_it::parser::core::root::Root",
"markdown_it_footnote::definitions::FootnoteDefinition",
"markdown_it::plugins::cmark::block::paragraph::Paragraph",
"markdown_it::parser::inline::builtin::skip_text::Text",
]);Structs§
- Footnote
Definition - AST node for footnote definition
Functions§
- add
- Add the footnote definition plugin to the parser