Skip to main content

highlight_code

Function highlight_code 

Source
pub fn highlight_code(
    code: &str,
    lang: &str,
    theme: &Theme,
) -> Option<Vec<Vec<(String, Style)>>>
Expand description

Highlight source code using the active theme, reusing a bounded preparation cache for repeated content/language/theme combinations.