You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mmh sure. I think it's a reasonable feature. I'll work on it tomorrow (I don't think it'll need a lot of work since it's just stripping ANSI control sequences).
Btw, I think we could actually add some boolean to keep or not the ANSI CSs since people may want to pprint the file ising other tools perhaps?
Describe the bug
If the terminal supports colour, Sphinx outputs in colour. This is good, it improves readability.
But if outputting to a file, it also adds ANSI colour codes, where is shouldn't.
How to Reproduce
index.rst
with an error, in this case, a typo in the role:And an empty
conf.py
will do.sphinx-build -b html . _build -n -w sphinx-warnings.txt
Actual result:
Because Sphinx is correctly detecting my terminal can do colour, it's correctly adding ANSI colour codes to the terminal output.
But it's also incorrectly adding them to the text file.
Expected result:
Colour in the terminal but no ANSI colour codes in the text file:
Environment Information
Sphinx extensions
None.
Additional context
No response
The text was updated successfully, but these errors were encountered: