Expand description
This crate provides Markdown language support for the tree-sitter parsing library.
It contains two grammars: LANGUAGE to parse the block structure of markdown documents and
INLINE_LANGUAGE to parse inline content.
It also supplies MarkdownParser as a convenience wrapper around the two grammars.
MarkdownParser::parse returns a MarkdownTree instread of a Tree. This struct
contains a block tree and an inline tree for each node in the block tree that has inline
content.
Structs§
- Markdown
Cursor parser - A stateful object for walking a
MarkdownTreeefficiently. - Markdown
Parser parser - A parser that produces
MarkdownTrees. - Markdown
Tree parser - An object that holds a combined markdown tree.
Constants§
- HIGHLIGHT_
QUERY_ BLOCK - The syntax highlighting queries for the block grammar.
- HIGHLIGHT_
QUERY_ INLINE - The syntax highlighting queries for the inline grammar.
- INJECTION_
QUERY_ BLOCK - The language injection queries for the block grammar.
- INJECTION_
QUERY_ INLINE - The language injection queries for the inline grammar.
- INLINE_
LANGUAGE - The tree-sitter
LanguageFnfor the inline grammar. - LANGUAGE
- The tree-sitter
LanguageFnfor the block grammar. - NODE_
TYPES_ BLOCK - The content of the
node-types.jsonfile for the block grammar. - NODE_
TYPES_ INLINE - The content of the
node-types.jsonfile for the inline grammar.