Nicolas Goaziou writes: > With latest patch and following Org buffer > > file:test.org > file:/test.org > file:///test.org > > I get (HTML export) > > <a href="test.html">test.html</a> > <a href="file:///test.html">file:///test.html</a> > <a href="file:///test.html">file:///test.html</a> > > So, it looks good so far.
groff has this snippet: --8<---------------cut here---------------start------------->8--- (if (file-name-absolute-p raw-path) (concat "file://" (expand-file-name raw-path)) (concat "file://" raw-path))) --8<---------------cut here---------------end--------------->8--- which unconditionally adds an authority if I read it correctly. > Unfortunately, it fails with a non-empty authority. E.g., > > file://hostname/test.org > > becomes > > <a href="hostname/test.html">test.html</a> > > So it is not satisfactory. Right, I didn't read as far into the patch. > One possibility is to store somewhere in the parsed link that the URI > provided the "//" part, and, if so, re-introduce it unconditionally when > building back the link. Well, there's the option of correctly parsing into scheme, authority, path, query and fragment... But that is probably not going into 8.2.6 in any case. https://tools.ietf.org/html/rfc3986 > Another one is to drop the whole thing, return to previous state, and > implement ad-hoc rules to fix "file:", which is probably the only scheme > introducing problems. I forgot what the previous state was, but trying to fix file: URIs without correctly parsing them sounds like a losing proposition. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada