Change pygmentize to not strip ansi escapes on windows by rmccampbell · Pull Request #2492 · pygments/pygments
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.
jofish920 pushed a commit to jofish920/pygments that referenced this pull request
Nov 3, 2024Adds 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters