Skip to main content

collapse_code_blocks

Function collapse_code_blocks 

Source
pub fn collapse_code_blocks(
    text: &str,
    cache_json: Option<&str>,
) -> (String, Option<String>)
Expand description

Collapse large fenced code blocks and

sections in text.

When cache_json is provided (a JSON object string), collapsed elements are stored with IDs. Returns (collapsed_text, updated_cache_json).