5

Currently, only links that actually contain a domain name are valid in Markdown. For example, this makes a valid Markdown link:

[this](http://www.example.com/that)

That works nicely for off-site links. However, particularly in comments, it's often beneficial to link to another part of the same site; a help page, another question, or something else on the site. Having to include the full site URL makes these links longer, sometimes significantly longer, than they really need to be, and can make things more complicated than they need to be with template comments like those made possible by the AutoReviewComments extension/userscript. Being space-constrained in comments (which one is not in a question or answer post) can also make a difference.

Seeing that for example anywhere on http://meta.stackexchange.com the following two are effectively identical:

<a href="/help/privileges">...</a>
<a href="http://meta.stackexchange.com/help/privileges">...</a>

it seems that Markdown links should function similarly also in comments. Hence, I'd be able to write in a comment

[privileges](/help/privileges)

which would work on any site, and go to that site's privileges page.

Hence, I suggest that links with a target address that is only a full path (that is, one that starts with /) should always be valid, just as links that start with a protocol and domain name are today.

  • 2
    This works just fine in posts, it only breaks in comments. – Ilmari Karonen May 21 '14 at 8:06
  • @IlmariKaronen Good point (I just tried it and it does appear to work the way I'd want). However, it's also most often useful in comments, where you are space-constrained. I'll update the question. – a CVn May 21 '14 at 8:17

You must log in to answer this question.

Browse other questions tagged .