Skip to main content

parse_keep_tree

Function parse_keep_tree 

Source
pub fn parse_keep_tree(
    tn: &Tabnas,
    src: &str,
) -> Result<(Value, Option<Tree>), MarkdownError>
Expand description

Parse through the engine and also hand back the native tree the parse built: the keepTree handshake the engine-path conformance harness uses, so it can render with the same render_html the engine-free path uses and isolate the parse from the rendering.

The tree is None for an empty source, which the engine answers with lex.empty_result before any rule runs. The instance must have the plugin installed; one without it parses, but hands back no tree.