Skip to main content

parse_with_options

Function parse_with_options 

Source
pub fn parse_with_options(
    input: &str,
    opts: ParseOptions,
) -> Result<Document, Box<dyn Error>>
Expand description

Parse Markdown text with runtime options controlling which work is performed.

This is the high-performance entry point. Pass a ParseOptions with fields set to false to skip expensive hot-path work at runtime.

For the default full-featured parse, use parse instead.

§Example

let opts = marco_core::ParseOptions {
    track_positions: false,
    ..Default::default()
};
let doc = marco_core::parse_with_options("# Hello", opts)?;
// All node spans are None — position computation was skipped.