💾 Archived View for gemini.bunburya.eu › newsgroups › gemini › messages › ydwni6918h.fsf@UBEblock.ps… captured on 2024-05-10 at 11:30:56. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
From: Winston <wbe@UBEBLOCK.psr.com.invalid>
Subject: Re: Gemini markup extensions [Was: Re: a solution for emphasis]
Date: Mon, 07 Feb 2022 09:53:50 -0500
Message-ID: <ydwni6918h.fsf@UBEblock.psr.com>
Gustaf Erikson posted:
> This post is a bit of a joke, poking fun at the almost
> utter lack of semantic signaling in gemtext. No-one would be happier
> than me if the community could agree that words within asterisks would
> be equivalent to the <em> tag in HTML, while words within underscores
> would be <strong>, and we could rely on clients (and screenreaders!) to
> interpret them as such.
to which Luca Saiu <luca@ageinghacker.net> replied:
The fact that the delimiters “*” and “_” are symmetrical makes it
difficult to parse them and introduces the possibility of mismatches.
How would we render “*a*b*c*d”? And “*a*b*c*d*”?
I would agree that single character '*' and '_' delimiters aren't going
to work well.
Better, but maybe not perfect, would be regular expressions matching
"\w\*[a-zA-Z0-9-]+\*[.,;!]?\w"and "\w_[a-zA-Z0-9-]+_[.,;!]?\w", where
"\w" means word separator / whitespace ([ \t\n\r] etc.).
So, then,
"*SURPRISE*!!" would match (assuming word separation),
"*a*b*c*d*" would (with word separation) unambiguously be <em>a*b*c*d</em>,
"*a*b*c*d" would not match (be rendered as written), and
"Please be _very_ careful." would contain <u>very</u>.
I would think that good regular expression matching would be able to
separate the common cases from the unusual or potentially ambiguous
ones.
-WBE
Parent:
Start of thread:
a solution for emphasis (by Gustaf Erikson <gerikson@gmial.com> on Sat, 05 Feb 2022 00:13:15 +0100)
Children: