Skip to main content

build_ir

Function build_ir 

Source
pub fn build_ir(
    text: &str,
    start: usize,
    end: usize,
    config: &ParserOptions,
) -> Vec<IrEvent>
Expand description

Scan text[start..end] once, producing a flat IR of events.

The scan is forward-only and never backtracks: each iteration either consumes a known construct (escape, code span, autolink, raw HTML), records a delim run / bracket marker / line break, or steps past a single UTF-8 boundary as plain text. Adjacent text bytes are coalesced into a single IrEvent::Text event by the run-flush step.