diff options
Diffstat (limited to '')
-rw-r--r-- | sphinx/util/exceptions.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/util/exceptions.py b/sphinx/util/exceptions.py index 9e25695..577ec73 100644 --- a/sphinx/util/exceptions.py +++ b/sphinx/util/exceptions.py @@ -6,7 +6,7 @@ from tempfile import NamedTemporaryFile from typing import TYPE_CHECKING from sphinx.errors import SphinxParallelError -from sphinx.util.console import strip_colors +from sphinx.util.console import strip_escape_sequences if TYPE_CHECKING: from sphinx.application import Sphinx @@ -31,7 +31,8 @@ def save_traceback(app: Sphinx | None, exc: BaseException) -> str: last_msgs = exts_list = '' else: extensions = app.extensions.values() - last_msgs = '\n'.join(f'# {strip_colors(s).strip()}' for s in app.messagelog) + last_msgs = '\n'.join(f'# {strip_escape_sequences(s).strip()}' + for s in app.messagelog) exts_list = '\n'.join(f'# {ext.name} ({ext.version})' for ext in extensions if ext.version != 'builtin') |