💾 Archived View for rawtext.club › ~sloum › geminilist › 007296.gmi captured on 2023-11-14 at 08:42:45. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
Oliver Simmons oliversimmo at gmail.com
Wed Oct 13 20:02:51 BST 2021
- - - - - - - - - - - - - - - - - - -
On Mon, 11 Oct 2021 at 15:07, Chris McGowan <cmcgowan9990 at gmail.com> wrote:
Doesn't the spec say that line type indicators are only three characters maximum?
It also implies that line type indicators should be the first thing on the line and that nothing should come before them (i.e. no whitespace before the indicator).
Yes and yup, we're talking about the space after the indicator.
That should mean that simply taking a three character substring of the line should be enough to determine whether it has a line type indicator and, if so, which type. That should be relatively easy and quick to parse as there's only about 5-6 different cases to handle.
Unfortunately, no. For example, take this line: `# Foo bar I'm a level-1 title`A 3-char substring of that would yield "# F", which isn't useful.It would work if the spec required (MUST) you to add whitespacepadding the indicator to three characters, but that's not how it is.
To determine the line-type you have to do a starts-with check or spliton the space like me and Omar are saying.
-Oliver Simmons (GoodClover)