Links in [link text][number] format don't work properly if they follow a tag using the new [tag:tagName] format. Here's the result of [tag:python] [gold badge page][1]:

[gold badge page]1

Putting the tag inside the link is worse. Here's the result of [[meta-tag:bug] some text][2], where [2] is google.com:

[meta-tag:bug] some text

The part of the link outside the tag just disappears silently.

To be more precise, the entire link to [2] disappears. The markup that is produced contains (invalid) nested anchor tags, as shown here from Firefox's "View Source":

<a href="http://google.com" rel="nofollow"><a href="/questions/tagged/bug" class="post-tag required-tag" title="show questions tagged 'bug'" rel="tag">bug</a> some text</a>

So the tag is still a link, but it is a link to the tag page, which is the behavior it would have if the link to [2] didn't exist at all. The user's desired behavior in this case is... ambiguous, to be charitable.

I briefly included markup from Firebug here, but it turned out to be irrelevant. It has now been removed to improve readability. See the revision history if you're interested.

  • 10 years? Not a big deal, but also seems like it would be a pretty easy fix. Commented Oct 19, 2021 at 13:06

3 Answers 3


The <a>[tag:name]</a> generating bad html is mildly annoying, even if I don't really think its a valid use case. I've gone ahead and checked in a fix to dev (we just won't process the tag syntax if it appears in an anchor tag).

The [tag] [text] [index] is actually by design. The markdown spec allows a space between a link's text and its "index." Its kind of a goofy use case, but its in there.

Markdown Link Spec

You can optionally use a space to separate the sets of brackets:
This is [an example] [id] reference-style link.

  • 12
    it's a totally goofy use case. I didn't even know that was supported! Commented Nov 19, 2010 at 23:15

Case 1 can be worked-around by inserting two spaces after [tag:python].

[tag:python]  [gold badge page][1]

gold badge page

  • 1
    as Kevin pointed out this is because the markdown spec allows a space between [link title][1] .. much to my surprise. Commented Nov 19, 2010 at 23:16
  • Stranger yet! I never would have suspected just one space was allowed!
    – SamB
    Commented Sep 19, 2016 at 15:28

Another way to work around this is to add the link in parentheses just like we do in comments.

For example:

[tag:support] [question from four years ago](https://meta.stackexchange.com/q/152827/321647)

This gives: question from four years ago

It's also possible to use the HTML space.

[tag:support]&#32;[question from four years ago][1]

Which gives the same result:

question from four years ago

You must log in to answer this question.

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