Function syntect::util::as_24_bit_terminal_escaped
source · pub fn as_24_bit_terminal_escaped(v: &[(Style, &str)], bg: bool) -> String
Expand description
Formats the styled fragments using 24-bit color terminal escape codes. Meant for debugging and testing.
This function is currently fairly inefficient in its use of escape codes.
Note that this does not currently ever un-set the color so that the end of a line will also get
highlighted with the background. This means if you might want to use println!("\x1b[0m");
after to clear the coloring.
If bg
is true then the background is also set