Convert ANSI colored terminal output #3731
jaydenseric
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prism.js is useful for syntax highlighting code examples in blog posts, for languages such as JavaScript and CSS. But something else you often want to show in articles is colored terminal output, where the output is text containing ANSI escape sequences. It would be great if there could be a way to use Prism.js to strip those ANSI escape sequences (or do something with them so the code is nicely readable in HTML) and replace them with syntax highlighting HTML.
So to describe the general idea, instead of syntax highlighting code, you are converting existing text syntax highlighting from one form (ANSI escape sequences) to another (Prism.js style HTML). Is this something Prism.js can already do, or is it possible with a new/custom Prism.js language?
Beta Was this translation helpful? Give feedback.
All reactions