💾 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
-=-=-=-=-=-=-
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.
Oct 21 · 8 weeks ago
This was requested by @sjlxndr. I expect that transforming ANSI color code sequences into HTML will be challenging.