Skip to main content

mask_code_blocks

Function mask_code_blocks 

Source
pub fn mask_code_blocks(text: &str) -> String
Expand description

Mask every CommonMark code block, preserving byte offsets and line count.

Content inside a masked block is whitespace to every line scanner that runs over the result — it can never open a section, register a heading, become a title, or yield a wiki-link.

Pass a body, not a whole entity file — see the module header.