A proposed scheme for parsing preformatted alt text
mbays at sdf.org
mbays at sdf.org
Wed Sep 9 18:38:56 BST 2020
* Monday, 2020-09-07 at 22:15 +0200 - Sandra Snan <sandra.snan at idiomdrottning.org>:
>This feels like the "hot comment" antipattern. Codifying a part of the
>language that was meant for humans.
>http://wiki.c2.com/?HotComments
Yes. IIUC, gemtext deliberately avoided having a comment line type in
order to avoid this problem. It was designed to be non-extensible. But
preformatting toggle lines -- both the opening ones we're talking about
here, and (to my mind even more worryingly) the closing ones -- seem to
have ended up as potential extensibility hooks anyway, because most
clients ignore any data there. (I haven't researched this properly, but
I checked that at least Amfora, AV-98, and Bombadillo ignore it by
default.)
So, with apologies for hijacking this thread with something totally
opposed to its original idea, I'd like to encourage client authors to
close this extensibility hole by not suppressing text after the "```" in
preformatting toggle lines.
For the opening line that means displaying the alt text by default
somehow. Even if the alt text is primarily intended for screenreaders,
it could well be interesting to visual readers.
For the closing line, the spec says
> Any text following the leading "```" of a preformat toggle line which
> toggles preformatted mode off MUST be ignored by clients.
I believe the intention is that having text there is an error (though
this could definitely be made clearer). So I suggest that when a client
encounters some text there, it displays some sort of (unobtrusive, but
not too unobtrusive) warning indicating that there is an error in the
gemtext. I know that with html it's traditional for renderers to be
forgiving about syntax errors, but since this and invalid uris are the
only ways gemtext can be invalid, I think it makes sense to be strict.
If most clients just ignore the error and suppress the extra text, one
day people will start using it as an extension mechanism, e.g. embedding
base64-encoded images.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20200909/e397a6a3/attachment.sig>
More information about the Gemini
mailing list