Crate tree_sitter_md

Source
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§

MarkdownCursor
A stateful object for walking a MarkdownTree efficiently.
MarkdownParser
A parser that produces MarkdownTrees.
MarkdownTree
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.