Since
6eabe9f2ff48c1b6924724d5afe64e7b661ccdbf we generate sequences
with ":", hence we better also know how to strip them.
(Without this patch we'd strip simple ANSI colors, but not RGB ones that
use ":" syntax).
(While we are at it, also drop a duplicate "0" in the list of valid
chars)
case STATE_CSI:
assert(n_carriage_returns == 0);
- if (eot || !strchr("01234567890;m", *i)) { /* EOT or invalid chars in sequence */
+ if (eot || !strchr(DIGITS ";:m", *i)) { /* EOT or invalid chars in sequence */
fputc('\x1B', f);
fputc('[', f);
advance_offsets(i - *ibuf, highlight, shift, 2);