Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_message_info.cpp
diff options
context:
space:
mode:
authorJeremy Rifkin2024-05-04 16:43:52 -0500
committerGitHub2024-05-04 23:43:52 +0200
commit8ce2426e53b2596a9823b4a314f72f1c3b30be82 (patch)
treee8262448f9810687436a3e4cb39372691e7baa31 /src/catch2/internal/catch_message_info.cpp
parentfa5a53df17303339eff8fda5cae0b601af207085 (diff)
downloadcatch3-8ce2426e53b2596a9823b4a314f72f1c3b30be82.tar.gz
Handle ANSI escape sequences when performing column wrapping (#2849)
This PR adds functionality to skip around ANSI escape sequences in catch_textflow so they do not contribute to line length and line wrapping code does not split escape sequences in the middle. I've implemented this by creating a AnsiSkippingString abstraction that has a bidirectional iterator that can skip around escape sequences while iterating. Additionally I refactored Column::const_iterator to be iterator-based rather than index-based so this abstraction is a simple drop-in for std::string. Currently only color sequences are handled, other escape sequences are left unaffected. Motivation: Text with ANSI color sequences gets messed up when being output by Catch2 #2833.
Diffstat (limited to 'src/catch2/internal/catch_message_info.cpp')
0 files changed, 0 insertions, 0 deletions