[spec] comments on the proposed gemini spec revisions

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@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 whitespace
padding 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 split
on the space like me and Omar are saying.

-Oliver Simmons (GoodClover)


Archive home | About this archive