0

Currently, [tag:tagname] is used to display and link to the tag tagname (commonly used in tag wikis), e.g. "". [tagname] is used in searches to search for questions with that tag.

This discrepancy in syntax can be confusing. Particularly, if you search for [tag:tagname], it gives you results tagged with tagtagname, which is probably not what the user wanted

2
  • I don't see the benefit of this.
    – Rob W
    Jul 22, 2012 at 22:22
  • @RobW: It would be a minor fix, enhancing polish by reducing a minor discrepancy in syntax. Jul 22, 2012 at 22:23

2 Answers 2

5

The Markdown and search syntax are just different. I don't think we should be encouraging users to use improper search syntax by actually allowing that syntax while searching. Instead, the search should just look at the tag specified and, if it sees the tag: part at the front, strip it out of the search.

So a search for [tag:tagname] will actually alter into a search for [tagname] and possibly display a notice to the user that their syntax was incorrect and has been changed. Any way, the tag: part should never be displayed back to the user as a valid search.

0

Here's a simple proposed fix:

Support [tag:tagname] as well in searches. Typing this should behave the same as [tagname], i.e. give results tagged with tagname.

This will need to be fixed in 2 places:

  • If the tag is the only search term, it currently redirects to http://stackoverflow.com/questions/tagged/tagtagname. Should instead redirect to http://stackoverflow.com/questions/tagged/tagname.
  • If the tag is one of multiple search terms, it goes to http://stackoverflow.com/search?q=[tag%3Atagname]+foo.
1
  • 1
    This should just be a part of your question. Considering it's a feature request, there should actually be a feature in your question that you're requesting.
    – animuson StaffMod
    Jul 22, 2012 at 22:32

You must log in to answer this question.

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