pub fn highlight(code: &str, path: &Path) -> Result<Vec<String>>Expand description
Highlights source code with syntax highlighting.
Convenience function that creates a highlighter and highlights the code. For repeated highlighting, create a Highlighter instance to reuse loaded syntaxes and themes.
ยงErrors
Returns error if highlighting fails.