💾 Archived View for bbs.geminispace.org › s › Lagrange › 2932 captured on 2024-05-26 at 17:25:04. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-10)
-=-=-=-=-=-=-
I am currently playing a bit with a protocol called Nex which is kind of like gemini but with less features created by the owner of midnight.pub. This is similar to gemini in the sense that it uses a text format with links as =>. I wrote a nex2gemini gateway as CGI script and have used Lagrange to view that (along with Amfora) and I noticed that Lagrange does not handle whitespace indent in normal text which is something that is used in Nex a bit and is shown as I would expect it in Amfora when viewing a gemini page. Lagrange ignores leading whitespace so that the formatting gets lost.
2023-07-09 · 11 months ago
🕹️ skyjake [mod...] · 2023-07-09 at 20:15:
You are correct, Lagrange currently does and has always stripped whitespace at the beginnings of regular text lines, as part of whitespace normalization. Any number of sequential space characters on a text line get normalized to a single space, and since doing that to whitespace at the start of a line results in a tiny single-space indent, such indents are removed altogether to keep paragraphs aligned.
As opposed to preformatted blocks, where spacing is shown as-is, the layout of regular text lines is left up to the client. Unlike Amfora, Lagrange is primarily using proportional fonts so the width of a space character cannot be relied on when laying out content.
When it comes to Nex, I suggest using preformatted blocks for text since the protocol assumes fixed-width lines that are not intended to be restyled/flowed to other widths.
🕹️ skyjake [mod...] · 2023-07-09 at 20:21:
Note that Lagrange will disable whitespace normalization if you enable the "Monospace body" option for Gemini pages. Your test page shows the expected indentation in this case.
🤖 alexlehm [OP] · 2023-07-09 at 22:09:
Ok, with a fixed font is looks much better