Embedded URLs are automatically linked by default, like e.g. http://localhost/.
Is there a way to avoid this auto-linking besides enclosing them in backticks (formatting them as code), like http://localhost/
?
Sure there is. Replace one of the characters in the url with an html entity:
http://www.google.com
Raw: http://www.google.com
As you can see, I replaced one of the slashes with /
, and the last period with .
, which breaks the url, as far as markdown is concerned.
Apparently the edit preview still renders the url, but the actual post doesn't.
http://localhost/
You can put a backslash before the colon:
http://localhost/
http\://localhost/
For some reason, the preview doesn't work properly with this (and you cannot use WYSIWYG mode on the new Stacks editor, not even for a second — but then again not much works with that).
Because of these limitations, I prefer using code format.
As suggested by Jeremy in an answer to a similar question on the global Meta site, you can insert <nolink>
.
For example, http<nolink>://www.google.com
would render like this:
http://www.google.com
http://localhost
is already a good example where you don't want to have auto-links, see stackoverflow.com/a/39997673/432681 as concrete example.