Hello,
I am currently working on a tool to convert reStructuredText files to Gemtext and I noticed the gemini://...
URIs (used by the Gemini Protocol) were not automatically converted into links.
I attached a small patch that adds the gemini
scheme to the docutils.utils.urischemes.schemes
dictionary.
Thank you for the contribution.
Unfortunately, we cannot include the patch without a change in the Docutils specification,
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#standalone-hyperlinks,
which limits the supported URI schemes to the ones listed in the Official IANA Registry of URI Schemes and the W3C's Retired Index of WWW Addressing Schemes.
While I don't see a "gemini" URI scheme as a particular problematic case, adding non-registered schemes should be done with special care and consideration. Up to now, we (as Docutils developers) did not start to take this task onto ourselfs but relied on the abovementined sources.
Mind, that the mapping in
doctuils.utils.urischemes
only considers the recognition of standalone hyperlinks. At places where an URI is expected (the link block of external hyperlink targets or the argument of an "image" or "figure" directive) any scheme is recognised, so the creation of valid "gemini" links is possible as, e.g.,Ok, thank you for the answer :)