File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ template <typename Char> struct ansi_color_escape {
430430
431431 private:
432432 static constexpr size_t num_emphases = 8 ;
433- Char buffer[7u + 3u * num_emphases + 1u ];
433+ Char buffer[7u + 4u * num_emphases + 1u ];
434434
435435 static FMT_CONSTEXPR void to_esc (uint8_t c, Char* out,
436436 char delimiter) noexcept {
Original file line number Diff line number Diff line change @@ -113,6 +113,15 @@ TEST(color_test, format) {
113113 EXPECT_EQ (fmt::format (" {}" , fmt::styled (" bar" , fg (fmt::color::blue) |
114114 fmt::emphasis::underline)),
115115 " \x1b [4m\x1b [38;2;000;000;255mbar\x1b [0m" );
116+ EXPECT_EQ (
117+ fmt::format (
118+ " {}" , fmt::styled (
119+ " all" , fmt::emphasis::bold | fmt::emphasis::faint |
120+ fmt::emphasis::italic |
121+ fmt::emphasis::underline | fmt::emphasis::blink |
122+ fmt::emphasis::reverse | fmt::emphasis::conceal |
123+ fmt::emphasis::strikethrough)),
124+ " \x1b [1m\x1b [2m\x1b [3m\x1b [4m\x1b [5m\x1b [7m\x1b [8m\x1b [9mall\x1b [0m" );
116125}
117126
118127TEST (color_test, format_to) {
You can’t perform that action at this time.
0 commit comments