Skip to main content

highlight

Function highlight 

Source
pub fn highlight(language: Language, text: &str) -> Vec<Span>
Expand description

Highlight text as language. Character offsets in the returned spans index the same text; the text itself is never altered.