๐Ÿ’พ Archived View for bbs.geminispace.org โ€บ u โ€บ A161 โ€บ 20596 captured on 2024-12-17 at 15:02:40. Gemini links have been rewritten to link to archived content

View Raw

More Information

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

colored code in gemini

hello, just want to test gemini. seems nice. does anyone know a client that can automatically detect language of code parts and color them like a code editor or github etc? would be great for tutorials, documentations and stuff.

๐Ÿš€ A161

Oct 09 ยท 2 months ago

4 Comments โ†“

๐Ÿš€ corscada ยท Oct 09 at 14:25:

Lagrange sorta supports this through mimehooks

โ€” here's someone doing it with python

๐Ÿš€ A161 [OP] ยท Oct 09 at 16:03:

ah nice, thx. so its possible but not that userfriendly yet

๐Ÿš€ sy ยท Oct 09 at 16:17:

Most clients do not bother to strip ANSI escapes. You can directly put the output from a code highlighter in the gemtext. E.g.: "bat --color=always --theme=GitHub". Just try to find one that blends with various background colors.

๐Ÿš€ stack ยท Oct 09 at 22:17:

It's not that "it's not userfriendly yet", it's basically undefined behaviour. It sort of works in some browsers, and some games rely on it, but it's not specified in the spec and should be generally avoided.