linguist: Regression: Add support for highlighting "pycon" (Python console/doctest)

Please add back support for using the “pycon” syntax highlighting that worked for years when GitHub was using Pygments. Linguist apparently lacks support for this. It’s probably just a variation of the highlighter for Python or for Python tracebacks, if that is supported (hmmm, is it?)

MIME type: text/x-python-doctest

Note that the following snippet using “pycon” is not highlighted. It used to be highlighted nicely when GitHub used Pygments:

>>>  try:
...     from io import StringIO
... except ImportError:
...     from StringIO import StringIO

The “python” highlighter does a reasonable job. It would be nicer if it “>>>” and “…” were colored differently but this is not bad.

>>>  try:
...     from io import StringIO
... except ImportError:
...     from StringIO import StringIO

Experiment using “pytb”:

>>>  try:
...     from io import StringIO
... except ImportError:
...     from StringIO import StringIO

“pycon” lexer is documented at http://pygments.org/docs/lexers/#lexers-for-python-and-related-languages

Demo of it using Pygments: http://pygments.org/demo/1061247/?style=default

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 2
  • Comments: 29 (11 by maintainers)

Commits related to this issue

Most upvoted comments

I’d like to see “pycon” syntax highlighting working again, too.

Wasted some time on research why this isn’t working anymore until I found this issue. 😦