HTML Highlighting of User-Defined Python Exceptions generates a pygments.filters.ErrorToken

Issue #1311 new
Sarah Clinch
created an issue

Originally reported in:

Calling the pygments.highlight() function with a source example that includes raising an exception and the traceback sometimes generates a pygments.filters.ErrorToken.

As far as I can tell, this seems to apply when trying to highlight an example with a user-defined exception, I don't see it with a built-in.

In the attached example file, I provide an example of the problem based on example that has the exception raised in an interactive terminal window (>>>) -- I have seen the same problem for examples that assume you're working in a source file too though.