diff --git a/src/main.cpp b/src/main.cpp index d53f123..c2a3bc2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,7 @@ std::string remove_colors(const std::string &text) auto newtext{text}; size_t pos{0}; - while ((pos = newtext.find('\x1b')) != std::string::npos) + while ((pos = newtext.find("\x1b[")) != std::string::npos) { const auto nchars{newtext.find('m', pos) + 1 - pos}; newtext.replace(pos, nchars, "");