Since Asciidoctor 1.5.0 we can use the document attribute hide-uri-scheme to turn URLs into links, where the link text is displayed without the URI scheme. This can save typing when we simply want to add a URL without any special description.

In the next Asciidoc syntax we first define URLs without the hide-uri-scheme attribute, followed by URLs after the attribute is set:

Reference to is
turned into link +

To loose URI scheme we could write the link
as[]. Or we
can use the new attribute `hide-uri-scheme` which is
added to Asciidoctor 1.5.0.


After applying the `hide-uri-scheme` attribute
the URI scheme is removed from the text in links.
So a reference to is
turned into the link +

This also works for other URI schemes like `file`.
For example
file:///Users/mrhaki/file.txt is translated to +

When we generate output using the HTML backend we see the following output:

Written with Asciidoctor 1.5.0.

Original article