summaryrefslogtreecommitdiff
path: root/pygments/lexers
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2023-04-12 20:10:13 +0200
committerGitHub <noreply@github.com>2023-04-12 20:10:13 +0200
commit50dd4d80e25c4c4afab503d41b471a536ed2af13 (patch)
tree023bdc3efb51d6a04baed31ce1b8aa95a47c448e /pygments/lexers
parent96a0cdf200ab8a36dc5f6f748f3b9d01c05cb91b (diff)
downloadpygments-git-50dd4d80e25c4c4afab503d41b471a536ed2af13.tar.gz
Python console: do not require output that looks like a traceback to be valid (#2410)
Diffstat (limited to 'pygments/lexers')
-rw-r--r--pygments/lexers/python.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py
index 6c89e6b5..eaaf6476 100644
--- a/pygments/lexers/python.py
+++ b/pygments/lexers/python.py
@@ -763,7 +763,8 @@ class PythonTracebackLexer(RegexLexer):
(r'^([^:]+)(: )(.+)(\n)',
bygroups(Generic.Error, Text, Name, Whitespace), '#pop'),
(r'^([a-zA-Z_][\w.]*)(:?\n)',
- bygroups(Generic.Error, Whitespace), '#pop')
+ bygroups(Generic.Error, Whitespace), '#pop'),
+ default('#pop'),
],
'markers': [
# Either `PEP 657 <https://www.python.org/dev/peps/pep-0657/>`