diff options
-rw-r--r-- | pygments/lexers/agile.py | 3 | ||||
-rw-r--r-- | tests/examplefiles/py3tb_test.py3tb | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index 078f0181..31df602b 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -428,10 +428,13 @@ class Python3TracebackLexer(RegexLexer): r'exception occurred:\n\n', Generic.Traceback), (r'^The above exception was the direct cause of the ' r'following exception:\n\n', Generic.Traceback), + (r'^(?= File "[^"]+", line \d+)', Generic.Traceback, 'intb'), ], 'intb': [ (r'^( File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)', bygroups(Text, Name.Builtin, Text, Number, Text, Name, Text)), + (r'^( File )("[^"]+")(, line )(\d+)(\n)', + bygroups(Text, Name.Builtin, Text, Number, Text)), (r'^( )(.+)(\n)', bygroups(Text, using(Python3Lexer), Text)), (r'^([ \t]*)(\.\.\.)(\n)', diff --git a/tests/examplefiles/py3tb_test.py3tb b/tests/examplefiles/py3tb_test.py3tb new file mode 100644 index 00000000..706a540f --- /dev/null +++ b/tests/examplefiles/py3tb_test.py3tb @@ -0,0 +1,4 @@ + File "<stdin>", line 1 + 1+ + ^ +SyntaxError: invalid syntax |