I have a source that has ANSI escape code color attached to the strings it spits out. These strings are being sent to the browser. I want to parse these ANSI escape codes with javascript in the browser so the it looks like it would in a terminal window.
The goal: ANSI strings -> html spans with styling
Is this possible? First I need to know how to parse ANSI strings in JS.
Thanks!!
https://github.com/mmalecki/ansispan
It's been done before. A quick Google search finds escapes.js as one example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With