What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Parens, outside

Input: ([text](http://example.com)
Result: ([text](example.com)
Expected: (text

Brackets, inside

Input: [[text]](http://example.com)
Result: [[text]](example.com)
Expected: [text]

These issues affect chat's markdown rendering too.

share|improve this question
    
Ztext –  YOU Jun 3 '10 at 9:23

4 Answers 4

I agree on the first one. While it makes sense to put some restrictions on (e.g.) italic markup, so that

@UserXYZ: Are you sure that 2*3*4 is 42?

does the right thing, the link syntax [bla](http://x) is so unambiguous that the restriction really isn't necessary. This will work in the next build.

Regarding the second one: You can write anything you want into the link text, so I really don't see the point of checking for nested brackets, thereby making some kind of syntactic assumption about free text.

For the rare cases that there's a closing bracket in a link text, I think it's fine to require the user to type one extra backslash to escape it.

share|improve this answer

Could we get this looked at? My issue was with trying to put quotes around a link:

"text" doesn't surround the link with quotes, but [text] does surround with brackets?

Another link is 
"[Generics (C# Programming Guide)](http://msdn.microsoft.com/en-us/library/512aeb7t.aspx)"

This works in an answer

Another link is "Generics (C# Programming Guide)"

But not in a comment (see below).

Putting the quotes in the [text] works, but the quotes aren't actually part of what I was trying to link. I was taught in school (ages ago) to put quotes around the title of an article I'm referring to, like "Generics (C# Programming Guide)". But in creating a link from this, I don't think I should be including the quotes.

Of course, I was taught before the Internet, so they didn't tell us what to do in this case. Just guessing.

share|improve this answer
    
Another link is "Generics (C# Programming Guide)" –  John Saunders Jan 30 '11 at 3:51
    
Another link is "Generics (C# Programming Guide)" –  John Saunders Jan 30 '11 at 3:52

It's not only on parens, they might be expecting a whitespace before []

share|improve this answer
    
That would explain the behavior I've been seeing with italic links. (Doesn't work with asterisks either inside or outside.) And [tag] links, for that matter, (which I always do inside). –  Gnome Jun 3 '10 at 9:33

Well for your second example, I always would put the brackets outside of the link. And the following works (without leading whitespace):

[[text](http://example.com)]

Doesn't seem to work for parens however. This behavior makes sense to me (considering parser design). Though, not if the parens are actually balanced.

share|improve this answer
    
When used for tags, I prefer to put the backets inside; e.g. [tag]. –  Gnome Oct 3 '10 at 5:00
    
As much is it would be convenient to be able to do that (within the link), I don't think they would be willing to change the comment parser for this. According to NullUser's comment here, you could probably escape the special characters using %91 and %93. %91test%93 Nope doesn't work. –  Jeff Mercado Oct 3 '10 at 5:07
1  
This makes “[text” a hyperlink as I reported in meta.stackexchange.com/questions/66486/…. –  Tsuyoshi Ito Oct 3 '10 at 5:51
    
@Tsuyoshi: Ah I had always thought the bracket was surrounding. Well good to know. –  Jeff Mercado Oct 3 '10 at 6:02
    
"text" doesn't surround the link with quotes, but [text] does surround with brackets? –  John Saunders Jan 30 '11 at 3:44

You must log in to answer this question.