Issue #874 closed

Bug in pycon lexer

Rohit Agarwal
created an issue

When using the following input with the pycon lexer, the output is not complete. Only the first line is shown in the output but the following lines are not shown.

>>> 1/0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  ZeroDivisionError: integer division or modulo by zero

The output is http://pygments.org/demo/82880/

Comments (4)

  1. Rohit Agarwal reporter

    Just a note, the following is how the python console prints tracebacks and it works correctly with pygments:

    >>> 1/0
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ZeroDivisionError: integer division or modulo by zero
    

    I had mistakenly input the following:

    >>> 1/0
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      ZeroDivisionError: integer division or modulo by zero
    

    which caused the issue.

    It is still a bug as the output text doesn't match the input text. But it happens rarely, that's why you haven't seen more reports of this. :-)

  2. Log in to comment