New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
H4-H6 should be handled per Gemini spec #1
Comments
@mntn-xyz very true. I just tested this with Amfora, and it handles whichever is the number of shebangs there is in the Gemtext document as though it was a heading of the third level: There seems to be no good graceful "lossless" way of doing that, as we could do either of these:
For now 1 appears to be the solution that breaks (almost) nothing? |
That was my thinking. It's unfortunate that there is no direct mapping from H4+ to Gemini, but as long as there is some visual representation then it's probably "good enough" which is the best one can do for a lossy mapping (Markdown -> Gemtext definitely qualifies as such). Since the space character is "mandatory" per the spec, then it should definitely be in there after three #s one way or another. It would technically be valid for a client to treat I'd be glad to work on a patch for this unless you get to it first! |
Gemini spec p. 5.5.1 used to only allow up to three #-s in a heading before requiring a mandatory space. It changed to an optional space in recent updates, allowing to no longer pad Markdown H4-H6. As clients treat everything after ### a title continuation, the renderer will now insert H4-H6 verbatim; the end-user behavior doesn't change as extra space means nothing for a Gemtext renderer displaying the title in a special way. Relates to #1. PS: Gemini spec doesn't appear to be properly versioned, saying the latest version is 0.14.3, 2020-11-29. The discussion on #1 clearly shows it used to be different a while ago.
I'll leave a note for anyone referencing this issue in the future: I was mistaken, the current official spec says that the space is optional, but the gemtext "quick introduction" from the same site says it is mandatory. The authors of some clients may be operating on either an old version of the spec or this outdated gemtext guide, which is likely the source of the client issues I encountered. |
First of all, thanks for making this! I plan on using it in a project.
The Gemini spec only supports three levels of headings: "Headings are limited to a single line and start with either one, two or three # symbols followed by one mandatory space character"
The extra #s generated by gmnhg seem to be inconsistently handled by some clients I've tried. It seems that the generated headings should be limited to three levels, although it would be nice to include some additional markup to help people distinguish H3 from H4-H6. It could be as simple as this:
Or maybe another character would be better?
The text was updated successfully, but these errors were encountered: