pub struct ParseOptions {
pub track_positions: bool,
pub parse_math: bool,
pub parse_diagrams: bool,
}Expand description
Runtime configuration for the Markdown parser.
Pass to parse_with_options to skip expensive hot-path work in
performance-sensitive pipelines.
All fields default to true (full-featured parse). Set individual fields
to false to opt out of that work at runtime (not just at compile time).
Fields§
§track_positions: boolTrack source positions (line/column spans) on every AST node.
When false, the O(n) string scans inside span conversion are skipped
and all node span fields will be None. Use this for render-only
pipelines that never inspect positions.
Default: true.
parse_math: boolParse inline $...$ / $$...$$ math and fenced ```math blocks.
When false, math syntax falls through to plain text or regular code
blocks. Skips the math parser attempts in the inline hot loop.
Default: true.
parse_diagrams: boolParse fenced ```mermaid code blocks into NodeKind::MermaidDiagram.
When false, mermaid blocks are emitted as regular NodeKind::CodeBlock
nodes. Skips the diagram branch in the fenced-code-block parser.
Default: true.
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more