3

I do not understand why SO did change the syntax for adding links from questions and answers bodies and when adding links in comments.

To add links to the former, you use [link text][1] [1] link address

To do the same while adding a comment, you simply use [link text](link address)

I had tried many times before to use the first form, in comments, just to remind myself (I once knew this, but forgot) that the syntax is different, after finding an answer as to how to add links to comments.

I understand that the 1st form offers the possibility to reuse the link throughout the question/answer, but making the syntaxes different makes it counter-intuitive and harder to keep these things in mind.

Perhaps overall the statistic says that links are not reused much in questions and answers - and I think many would agree that the 2nd form is more intuitive, if we have to choose from the two.

  • 3
    But just to make sure, you already know that both versions work in questions and answers, right? – Christian Rau Aug 2 '15 at 15:50
  • Actually not... :) I thought that the 2nd did not. How does one learn the syntax to add comments ? By seeing what does clicking the link icon when adding a question/answer. Well... your remark then answers the question, just need to elaborate it a bit more. I will do that, just add your comment as an answer so I can select it as so :) – Veverke Aug 2 '15 at 16:00
  • 2
    In addition to that, here's where to look for more information. – Christian Rau Aug 2 '15 at 16:03
8

The format [text](link) is more convenient for manual insertion. When I'm typing everything with my human hands, without the help of editor shortcuts, this is the only format I use.

The syntax [text][reference] with reference URL at the bottom is automatically generated when you either click the "link" button in the editor or select some text, press Ctrl-L and enter URL. This is particularly convenient for making a part of already-typed sentence a hyperlink.

Besides link reuse, an advantage of the [second format][1] over the first is that it keeps the source neater: [having this](http://meta.stackexchange.com/questions/261917/why-is-the-syntax-for-adding-links-in-comments-different-than-the-one-in-questio) in the middle of a sentence makes editing a bit more difficult, e.g., when you are trying to fix typos in someone's post.

The comments are very different: they do not support Markdown. They support something called mini-Markdown (designed by Jeff Atwood), which is a tiny subset of Markdown.

You must log in to answer this question.

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