Jeremy Rifkin
8ce2426e53
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 .
2024-05-04 23:43:52 +02:00
..
2023-12-23 11:23:32 +01:00
2023-03-23 16:50:07 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-12-27 21:43:49 +01:00
2024-01-02 23:27:13 +01:00
2024-03-01 21:24:45 +01:00
2022-10-28 11:30:15 +02:00
2022-12-09 00:40:01 +01:00
2024-02-13 00:01:19 +01:00
2022-10-28 11:30:15 +02:00
2023-05-28 21:04:16 +02:00
2023-07-19 17:04:43 +02:00
2023-05-29 00:55:20 +02:00
2023-05-28 21:04:16 +02:00
2023-05-28 21:04:16 +02:00
2024-03-01 21:24:45 +01:00
2023-01-12 15:01:47 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-03-20 20:46:41 +01:00
2023-03-20 20:46:41 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-01-14 00:03:30 +01:00
2024-02-12 00:52:53 +01:00
2024-04-30 23:51:36 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-08-05 18:21:38 +02:00
2024-03-01 21:24:45 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-08-05 18:21:38 +02:00
2023-03-23 12:26:44 +01:00
2023-12-23 11:23:32 +01:00
2023-12-23 11:23:32 +01:00
2023-12-10 18:44:10 +01:00
2023-12-10 18:44:10 +01:00
2022-11-09 14:47:55 +01:00
2022-10-28 11:30:15 +02:00
2023-02-06 15:29:01 +01:00
2024-01-14 23:33:51 +01:00
2022-10-28 11:30:15 +02:00
2024-03-01 21:24:45 +01:00
2024-03-01 21:24:45 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-08-05 18:21:38 +02:00
2022-10-28 11:30:15 +02:00
2023-12-23 11:23:32 +01:00
2022-10-28 11:30:15 +02:00
2022-11-20 17:03:29 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-03-22 19:12:03 +01:00
2022-12-09 16:18:33 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-05-06 15:22:02 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-12-12 12:15:42 +01:00
2022-10-28 11:30:15 +02:00
2024-03-12 22:57:59 +01:00
2023-12-10 18:44:06 +01:00
2023-12-10 18:44:06 +01:00
2023-05-07 20:58:54 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-12-10 19:53:46 +01:00
2024-04-19 10:36:37 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-12-10 21:37:12 +01:00
2022-10-28 11:30:15 +02:00
2023-11-14 22:52:15 +01:00
2023-03-22 23:58:44 +01:00
2024-03-01 21:24:45 +01:00
2023-12-23 11:23:32 +01:00
2022-10-28 11:30:15 +02:00
2023-01-12 15:01:47 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2024-04-21 21:52:33 +02:00
2023-05-06 23:58:48 +02:00
2023-12-23 11:23:32 +01:00
2024-03-01 21:24:45 +01:00
2023-12-26 14:02:19 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-03-22 19:12:32 +01:00
2024-03-01 21:24:45 +01:00
2023-01-08 20:08:58 +01:00
2023-02-20 15:05:09 +01:00
2024-03-01 21:24:45 +01:00
2023-12-23 11:23:32 +01:00
2022-10-28 11:30:15 +02:00
2023-02-23 15:12:14 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2024-04-08 13:57:59 +02:00
2024-04-08 13:57:59 +02:00
2023-02-20 15:19:57 +01:00
2023-04-29 12:55:51 +02:00
2023-03-12 00:45:31 +01:00
2023-03-12 00:45:31 +01:00
2024-01-24 22:41:00 -07:00
2023-03-23 16:50:11 +01:00
2024-03-01 21:24:45 +01:00
2023-03-31 19:31:51 +02:00
2023-02-13 22:16:53 +01:00
2022-10-28 13:27:46 +02:00
2024-05-04 23:43:52 +02:00
2024-05-04 23:43:52 +02:00
2022-10-28 11:30:15 +02:00
2023-12-23 11:23:32 +01:00
2022-10-28 11:30:15 +02:00
2023-12-10 19:53:46 +01:00
2024-04-03 13:27:10 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-01-08 20:08:58 +01:00
2022-10-28 11:30:15 +02:00