Closed jerstlouis closed 1 month ago
I figured how to make it work with "\https://..." inside the [ ], using the %20
outside the [ ].
Though it may still be interesting that these URLs worked fine with asciidoctor. (related to #664 and #671)
Lemme investigate why they work in Asciidoctor (eventually), it will lead to an editorial tip...
Added note from https://github.com/metanorma/metanorma-ogc/issues/664:
So I've verified this with the 3 links including CRS CURIEs that were causing problems, and this is what works for each of them:
https://maps.gnosis.earth/ogcapi/collections/blueMarble/map?center=0,51.5&scale-denominator=20000000&crs=%5BEPSG:4326%5D["\https://maps.gnosis.earth/ogcapi/collections/blueMarble/map?center=0,51.5&scale-denominator=20000000&crs=[EPSG:4326\]"]
https://maps.gnosis.earth/ogcapi/collections/blueMarble/map?center=0,51.5&scale-denominator=20000000&crs=%5BEPSG:3395%5D["\https://maps.gnosis.earth/ogcapi/collections/blueMarble/map?center=0,51.5&scale-denominator=20000000&crs=[EPSG:3395\]"]
https://maps.gnosis.earth/ogcapi/collections/blueMarble/map?bbox-crs=%5BEPSG:3395%5D&bbox=-4596385.263861,2080129.089271,4596385.263861,11273386.415933&crs=%5BEPSG:3395%5D["\https://maps.gnosis.earth/ogcapi/collections/blueMarble/map?bbox-crs=[EPSG:3395\]&bbox=-4596385.263861,2080129.089271,4596385.263861,11273386.415933&crs=[EPSG:3395\]"]
For the last one, the text is cut-off in the PDF rendering as it doesn't get a line-break, which is somewhat problematic:
Note that these escaping backslashes render as actual backslashes in the displayed text when using asciidoctor-pdf
, so this syntax / behavior is different in metanorma than plain ASCIIDoc -- is that expected?
To summarize just how incredibly difficult it is to encode such links including CURIEs:
[
and ]
(also applies to ASCIIDoc)[
or ]
, they need to be URL-encoded in the link portion (also applies to ASCIIDoc)]
need to be escaped with a \
(also applies to ASCIIDoc),
or ampersand &
?) (also applies to ASCIIDoc)\
needs to be added in the displayed text right before the https (specific to metanorma)Fixed in https://github.com/metanorma/metanorma-ogc/issues/671 : the additional requirements of \ escaping was introduced in Metanorma when we started treating links as passthroughs to prevent substitutions, and that was resulting in the link text then being identified as the hyperlink instead. Dealing programmatically now with escaping link text instead,
Both of these links work fine with asciidoctor-pdf:
In the HTML rendering, metanorma stops the link at the first
%20
in the first and turns the<-
in Elevation<-4000 into an arrow (←
).How can we use that link?
Thanks!