Issue #770 new

Support ANSI (ECMA-48) color-coded text input

Michał Górny avatarMichał Górny created an issue

I feel like many pastebin users would appreciate such a feature in pygments: reading (already colored) data stream with ECMA-48 color codes embedded (like console program output) and outputting it in any format pygments support.

I guess such a feature would require adding a new token types to represent console colors.

If there's interest in this, I can assemble a patch for it.

Comments (5)

  1. Tim Hatch

    I'd be interested in at least a 16-color version of this. Some of the other codes (like bold, reverse, etc) might overcomplicate it however. Can you get a basic version ready to review in the 1.7 time frame (guessing 6 months out)?

  2. Michał Górny

    I'm sorry but I'm overburdened with work all the time, and this one doesn't come as a priority to me. I will be happy to work on this but I don't know when I'll have a free hand.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.