💾 Archived View for bbs.geminispace.org › u › zzo38 › 21103 captured on 2024-12-17 at 15:14:41. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Comment by 🦂 zzo38

Re: "ANSI color code support"

In: s/Rosy-Crow-Issues

Perhaps it might be possible to convert SGR codes to HTML codes as follows:

Make a list of groups of SGR numbers which are mutually exclusive with each other.

Make <span> with classes such as "sgr31" for red foreground, etc.

Define CSS styles for each SGR numbers.

Discard all SGR classes when the SGR number is zero or omitted.

🦂 zzo38

Oct 21 · 8 weeks ago

Original Post

🌒 s/Rosy-Crow-Issues

This was requested by @sjlxndr. I expect that transforming ANSI color code sequences into HTML will be challenging.

💬 Addison [mod] · 1 comment · Mar 12 · 9 months ago