--relaxed-autolinks (parse.relaxed_autolinks) makes autolinks more permissive. Most importantly:
- autolinks are recognised inside brackets;
- a URL autolink may use any scheme; and,
- a www autolink’s domain needn’t contain a period.
The option has no effect unless autolinks are enabled.
For the full rules, see Relaxed autolinks.
Without the option, none of these are autolinks:
Example 1
$ comrak -e autolink -t commonmark -t xml
[https://foo.com]
irc://irc.freenode.net/git
www.example
[https://foo.com]
irc://irc.freenode.net/git
www.example
[https://foo.com]
irc://irc.freenode.net/git
www.example
With the option, they all are:
Example 2
$ comrak -e autolink --relaxed-autolinks -t commonmark -t xml
[https://foo.com]
irc://irc.freenode.net/git
www.example
[
https://foo.com
]
irc://irc.freenode.net/git
www.example