Skip to main content

highlight

Function highlight 

Source
pub fn highlight(
    code: &str,
    language: Language,
) -> Option<Vec<HighlightedToken>>
Expand description

Highlight code, returning token ranges.

Returns None if the language is not supported or highlighting fails. When the syntax-highlight feature is disabled, always returns None.