The occasional geminer - an artisanal, handcrafted gemlog

↑ latest entries

Re: Mark It Down

gemini://skyjake.fi/gemlog/2021-10_mark-it-down.gmi

Instead of implementing Markdown support in Gemini clients, I would prefer a Markdown parser to emit valid gemtext instead of HTML.

Off the top of my head, it would do the following:

Simply translate headers > 3 into 3-rd level headers with leading hashes:

"5 level header"

Do a simple translation of inline links:

This is an [interesting link](http://example.com).

becomes

This is an [interesting link].
=> http://example.com interesting link

simply strip embedded HTML, or ignore it.

Translate logical paragraphs into single lines.

Handle numbered lists by creating normal gemtext lines:

1. item one

2. item two

3. item three

Just thoughts for now. I've never really dived deep into Markdown parsers.

My main point is that while I appreciate Lagrange picking up Markdown support, I think authors like me would prefer to keep a Markdown-centric authoring workflow, instead of having to literally serve raw Markdown as a separate mime-type. Especially if this is only implemented by a subset of clients.

[MD source] -> [parser] -> [HTML output]
                       `-> [.gmi output]

vs

[MD source] -> [parser] -> [HTML output]
           `-> [gemini server w/ 'text/markdown']

Idiomdrottning has replied

gemini://idiomdrottning.org/re-mark-it-down

Specifically for the section referencing my post.

The risk of having all those kinds of extra syntax out there is that some clients will get tempted to start rendering it and then there we are with an embraced&extended&extinguished format. Asterisks for emphasis same thing, and even image-inlining by default.

But that's an explicit part of the spec. Clients are free to do what they want with gemtext. I'd love to use a client that parses _italic_ and **bold** like Markdown does. I'd be fine with one that pseudo-implements headers lower than level 3.

As to whether there's a danger of Lagrange becoming the de-facto standard for clients, this too is more or less inevitable. Not Lagrange specifically, but the relative economics of developing vs. content creation/consumption means that there will be a power law of popularity where a few browsers have massive popularity compared to others.

──────────────────────────────────────────────────────────

¶ Thursday, 2021-10-14

→ more posts in the ‹misc› category

About this category: “What is says in the URL path”

Copyright © 2018 - 2021 Gustaf Erikson

Main page for this gemsite