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 - A stateful object for walking a
MarkdownTree
efficiently. - Markdown
Parser - A parser that produces
MarkdownTree
s. - Markdown
Tree - 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
LanguageFn
for the inline grammar. - LANGUAGE
- The tree-sitter
LanguageFn
for the block grammar. - NODE_
TYPES_ BLOCK - The content of the
node-types.json
file for the block grammar. - NODE_
TYPES_ INLINE - The content of the
node-types.json
file for the inline grammar.