build_html_tree

Function build_html_tree 

Source
pub fn build_html_tree(
    ctx: &KatexContext,
    tree: &[AnyParseNode],
    _expression: &str,
    settings: &Settings,
) -> Result<DomSpan, ParseError>
Expand description

Builds HTML-only DOM tree from a parse tree

This function specifically builds HTML output, similar to buildTree but guaranteed to produce HTML-only output regardless of settings.

§Parameters

  • ctx - The KaTeX context containing builders and symbols
  • tree - The parse tree to build from
  • expression - The original LaTeX expression string
  • settings - Rendering settings

§Returns

A Result containing a DomSpan with the built HTML DOM tree or a ParseError