-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
When using multiple nested colored strings, like this:
use owo_colors::{AnsiColors, OwoColorize};
fn main() {
println!(
"{}",
format!("TEST {} TEST", "TEST".color(AnsiColors::Red)).color(AnsiColors::Green)
);
}the color ends up getting reset in the middle of the string.
This means that the this is going to print test strings of these colors: green, red, white. But in this example, I'd expect green, red, green.
I'm assuming this is happening because the coloring doesn't take into account the reset escape sequence in the inner string.
sanpii, ClementNerma, olson-sean-k and GideonBear
Metadata
Metadata
Assignees
Labels
No labels