Skip to main content

apply_prelude_mapped

Function apply_prelude_mapped 

Source
pub fn apply_prelude_mapped(source: &str) -> (Cow<'_, str>, Vec<PreludeSegment>)
Expand description

apply_prelude plus the exact edit it performed, as ordered output runs. A consumer that parses the expanded text and reports spans against the USER’s buffer must translate through these segments rather than assume the modules were prepended: they are spliced AFTER any leading title/comment prose, and ## NoPrelude REMOVES its marker lines.