Change pygmentize to not strip ansi escapes on windows by rmccampbell · Pull Request #2492 · pygments/pygments

@rmccampbell

This maintains the colorama conversion behavior when needed (only for the legacy Windows console) but does not strip them for non-console output, e.g. to pipes.

@jeanas mentioned this pull request

Sep 11, 2023

jofish920 pushed a commit to jofish920/pygments that referenced this pull request

Nov 3, 2024
Adds support for '--strip-escape={off,on,auto,raw,semi-raw}'.
The first 3 are as according to the suggestions from the comments
in PR pygments#2492.

The test case throws up errors for the 'off' and 'semi-raw' values
as output cuts off after 32808 characters.  I'm fairly certain the
bug is in the test, as running the program on the same data with the
same options outside of `pytest` works fine.