💾 Archived View for bbs.geminispace.org › s › Rosy-Crow-Issues › 45 captured on 2024-12-17 at 11:55:15. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-09-29)
-=-=-=-=-=-=-
This was requested by @sjlxndr. I expect that transforming ANSI color code sequences into HTML will be challenging.
🐞 Issue #45 in s/Rosy-Crow-Issues
Mar 12 · 9 months ago
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.