Closed GuillaumeDua closed 3 months ago
Reproduction: https://godbolt.org/z/o5saW68cq
Here, using any format of the std::string formatter (but the default) results in deactivating the colors/termcaps.
-> Is it the intended behaviour ?
auto str = fmt::format( "styled [{0:.2f}]", fmt::styled(1.23, fmt::fg(fmt::color::green) | fmt::bg(fmt::color::blue)) ); fmt::print("{}\n", str); fmt::print("hello {:?} world\n", str); fmt::print("hello {:?} world\n", std::string{"funny"}); fmt::print("hello \"{}\" world\n", str); fmt::print("hello ||{:^.20}|| world\n", str);
String formatter doesn't know about ANSI escape codes so it is expected that applying escaping or truncation can interfere with those codes.
Reproduction: https://godbolt.org/z/o5saW68cq
Here, using any format of the std::string formatter (but the default) results in deactivating the colors/termcaps.
-> Is it the intended behaviour ?