9

So the FAQ shows "three ways to write links." All involve a [name] part and a (link) part (or a [link] part).

I just noticed it's also possible to omit the link part in case the name part matches the URL identifier:

So the [FAQ] shows...

[faq]: https://stackoverflow.com/editing-help

, which produces the link you can see in the beginning of this question.

Is that a pleasant bug in Markdown?
Or is that a nice feature not listed in the editing FAQ for some reason?

2 Answers 2

2

Yes, this is supported by MarkdownSharp. I guess you'd say it's a bit of an easter egg..

7

A rather similar way is explicitly allowed in the original Markdown spec, with the only exception that it requires an additional set of empty brackets:

The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets — e.g., to link the word “Google” to the google.com web site, you could simply write:

   [Google][]

And then define the link:

   [Google]: http://google.com/

So I'd assume it's very much intentional.

1
  • Aha, and yet again (even without the extra brackets) the preview matches the actual output. Nice!
    – Arjan
    Mar 21, 2011 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .