Skip to main content

compact_text

Function compact_text 

Source
pub fn compact_text(
    text: &str,
    limit: usize,
    cache_json: Option<&str>,
) -> (String, bool, Option<String>)
Expand description

Collapse code blocks then truncate if over limit. Returns (text, was_truncated, cache_json).