-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

Visual Gemtext Primer


I created a visual Gemtext primer some months ago to spot the difference in the rendering of Gemtext pages with different browsers.


Today I added a section at the bottom, because some clients behave differently and the spec is not very clear about this.


What's your take?


Posted in: s/discuss

🍵 michaelnordmeyer

2023-05-24 · 1 year ago · 👍 Morgan


11 Comments ↓


🛰️ lufte · 2023-05-24 at 20:22:

I would open a ticket in the gemini spec repository about that discrepancy with headings. I like this capsule by the way, it will come in handy for anyone writing a browser and wanting to test their parsing code. I doubt I have myself is, for example, incomplete link or quotes. What is a line of text that only consists of "=>"? A text line? An invalid link and therefore invalid document? An empty link?


🍵 michaelnordmeyer [OP] · 2023-05-24 at 21:11:

@lufte A very useless line consisting of just => and maybe some whitespace afterwards. As soon as you have non-whitespace after =>, it will be considered a link.


Good thinking, btw. I added this case to the page. 👍


☕️ mozz · 2023-05-24 at 21:16:

> Consecutive blank lines wonʼt be compacted into one.


I agree with you on this one. It's tempting to treat consecutive plain gemtext lines like a markdown paragraph, and normalize whitespace between "paragraphs" and other elements such as headings. But gemtext doesn't have semantic paragraphs, and grouping consecutive lines together that way feels like a misinterpretation of the spec to me.


For example, these two snippets should be rendered differently.


# Heading
Hello

# Heading

Hello world

The same argument applies to consecutive quote lines and bullet lines, which should not be grouped into a single semantic list or quote. But it's very familiar to want to treat them like <ul> and <blockquote> tags so that's what ends up happening.


🍵 michaelnordmeyer [OP] · 2023-05-24 at 21:18:

@lufte With Gemini repo, do you mean

— https://gitlab.com/gemini-specification


It is not linked from gemini.circumlunar.space and seems to be outdated. Spec is v0.15.0 vs. v0.16.1.


🍵 michaelnordmeyer [OP] · 2023-05-24 at 21:23:

@mozz I'm not sure I understand what you mean. I'm pro context-free rendering. So compacting multiple lines would be bad.


What I meant was inline whitespace. What happens to a text line, where I have two spaces in a row? What happens with quotes regarding ">" vs. "> "? In this case, Geopard, the Gnome-native Gemini browser, used to indent a quote by a space, but the wrapped line beginning was not indented.


🍵 michaelnordmeyer [OP] · 2023-05-24 at 21:40:

FYI, I updated the parts for headings and quote regarding whitespace.


🛰️ lufte · 2023-05-24 at 23:03:

@michaelnordmeyer Huh, I did mean that repo but I didn't know it was abandoned. It looks like work is happening in another repo or privately.


☕️ mozz · 2023-05-25 at 00:11:

> @mozz I'm not sure I understand what you mean. I'm pro context-free rendering. So compacting multiple lines would be bad.


Right, I think we're on the same wavelength here. I was just elaborating my thoughts behind it for the sake of discussion.


> What I meant was inline whitespace. What happens to a text line, where I have two spaces in a row? What happens with quotes regarding ">" vs. "> "? In this case, Geopard, the Gnome-native Gemini browser, used to indent a quote by a space, but the wrapped line beginning was not indented.


My take on how it 'ought to be matches the implementation that you are describing for Geopard. That's how I did it on my proxy server. For example, the quote on this page preserves the leading whitespace, but does not indent wrapped lines.


https://portal.mozz.us/gemini/astrobotany.mozz.us/


🍵 michaelnordmeyer [OP] · 2023-05-25 at 08:43:

@lufte Found the current repo. It was a little hidden in the official FAQ: git://gemini.circumlunar.space/gemini-site


🕹️ skyjake [...] · 2023-05-25 at 17:45:

@michaelnordmeyer:

> What happens to a text line, where I have two spaces in a row?

The specification says that spacing in text lines can be normalized, so it's up to the client what happens there. The spaces can be normalized to one space, or they can be kept as multiple.


🍵 michaelnordmeyer [OP] · 2023-05-25 at 18:21:

@skyjake The exact wording is not excatly clear. From the spec:


> For example, variable width fonts may be used, spacing may be normalised, with spaces between sentences being made wider than spacing between words, and other such typographical niceties may be applied.


It can also mean, that just the space between sentences can be varied with unicode spaces of different length.


Given that Gemini is a modernized Gopher, and Solderpunk uses tabs to align his links, normalization of inline whitespace could very well be the goal.

-- Response ended

-- Page fetched on Sun May 19 12:50:44 2024