7

Is there a different syntax for commenting with links that contain parentheses? I tried something like this:

[my text](http://msdn.microsoft.com/en-us/library/ms191439(SQL.90).aspx)

And that yielded this in the comment:

my text.aspx

10
  • possible duplicate of meta.stackexchange.com/questions/13501/…
    – Jon Seigel
    May 7 '10 at 21:52
  • It's different in comments... like so May 7 '10 at 21:57
  • 6
    my text <-- escaped using %28 and %29
    – Jon Seigel
    May 7 '10 at 21:58
  • 1
    For Microsoft links, often you can just remove the part in parenthesis, and the link will still work
    – user102937
    May 7 '10 at 22:49
  • 1
    In fact, it's best to leave off the parenthesis part for MSDN links. That way, they'll always link to the latest version. Try it without the parens, first, to be sure. Jan 30 '11 at 3:35
  • @balpha isn't this a feature request more than a bug? Looks like you added new feature of supporting one level of parentheses rather then fixing a bug. No? Jun 18 '12 at 8:06
  • @ShaDowWizArd I'm not to hung up on the distinction between the two in this case, both have a point. Also note that this change was made ages ago; I just noticed this question (because an old dupe just floated to the top of meta).
    – balpha
    Jun 18 '12 at 8:09
  • @balpha OK fair enough. I was thinking to add this to the feature change log what do you think? Jun 18 '12 at 8:31
  • @ShaDowWizArd The change is from January 2011, so it's a stretch to call it recent -- but do as you please :)
    – balpha
    Jun 18 '12 at 8:41
  • 1
    @balpha being a complete log, I couldn't resist editing it with this. Easier to find when something was done. :) Jun 18 '12 at 9:06
3

It's the same syntax, but rendering balanced matching parens is quite expensive in regex, and the comment regexes are run every time the post loads and displays -- so the support in comments isn't as good as in posts. We do however support one level of balanced parentheses, which covers your case.

As Jon noted, use %28 and %29 to encode the parens in cases where they aren't balanced or are nested more than one level deep.

1
  • I cannot get this to work with the following link: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) According to what I've read, it should work (there is only one pair of parens). I have tried to use %28 and %29, but it's not working. Is it possible to include a link when the URL ends with a paren?
    – jahroy
    Jun 13 '13 at 22:16

You must log in to answer this question.

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