Skip to content

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

@Anteru

Description

@Anteru

(Original issue 1311 created by sclinch on 2016-11-28T15:57:32.837598+00:00)

Originally reported in: [https://github.com/sphinx-doc/sphinx/issues/2830](Link URL).

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-minorseverity: minorT-bugtype: a bugX-importedimported from Bitbucket

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions