Skip to main content

trim_leading_indent

Function trim_leading_indent 

Source
fn trim_leading_indent(line: &str, max: usize) -> &str
Expand description

Strip up to max leading ASCII spaces from line. Tabs are not expanded — CommonMark allows them inside the indent budget but our masking pass is a pre-pass for trigger char masking, not a CommonMark conformance check; tabs flow through untouched and the fence-detector simply fails on lines that lead with a tab. That is a strict subset of valid fences but matches every real-world afm source we have seen.