💾 Archived View for rawtext.club › ~sloum › geminilist › 007141.gmi captured on 2023-09-08 at 16:42:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

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

<-- back to the mailing list

Syntax highlighting

mntn mntn at mntn.xyz

Sat Sep 18 22:51:10 BST 2021

- - - - - - - - - - - - - - - - - - - 
Personally I think using the MIME type would be most sensible, it's
what's already done when a page is received, so it'd make development
easier for clients.
(I'm including non-""official"" MIME types. The ""official"" coverage
of source code files is a bit lacking)

You have a good point. I wonder "why not both" -- a client could make a best effort to detect thelanguage using several methods. For the example listed, "js" may also be appropriate alt text forJavaScript. Again, if it can't be parsed as the detected language, it wouldn't be highlighted.

However, I imagine making a screen-reader read code would be absolute hell!
So it would be extremely useful for this to be a thing, so the code
can be roughly described in a screen-reader safe way.

That's exactly what I was thinking. I think this would both benefit users with screen readers (sothey know what's coming) and people like myself who find it easier to parse code with some syntaxhighlighting in place.

I can also imagine a highly advanced screen reader that might be able to parse code and presentsome kind of intelligent navigation. (Next/previous statement or expression, enter or exit nestedcode, etc.) I don't believe this exists today, but I can imagine it!