Skip to main content

highlight_code

Function highlight_code 

Source
pub fn highlight_code(code: &str, language: &str) -> String
Expand description

Highlight script code for terminal output

Uses ANSI escape codes to add syntax highlighting to code. Falls back to plain text if highlighting fails.