Fix display of local file links
authorAlex Schroeder <alex@gnu.org>
Tue, 10 Aug 2021 22:58:14 +0000 (00:58 +0200)
committerAlex Schroeder <alex@gnu.org>
Wed, 11 Aug 2021 20:34:57 +0000 (22:34 +0200)
The code that shows an IRI for URLs if no display-string is provided
used to display with double slashes when it happened upon a simple
local filename link, like this:

=> /some/file.gmi

Result:

→ ///some/file.gmi

In order to fix this, we need to make sure that url-fullness remains
nil. This commit makes sure that it is only set if the URL in question
does in fact have a non-empty host (an empty host results in a host of
"" is a true value, so we need an extra test using string-empty-p).

This happens in both elpher-address-from-url and
elpher-address-from-gemini-url.


No differences found