10

This may be related to this question: Comment bug with URLs and square brackets, however it still appears to be an issue for me.

I wanted to leave a comment with a link, so I typed:

[Convert.ToBase64String(byte[])](http://msdn.microsoft.com/en-us/library/dhx0d524(v=vs.110).aspx) 

Which displayed the following:

[Convert.ToBase64String(byte[])](msdn.microsoft.com/en-us/library/dhx0d524(v=vs.110).aspx) 

I had to escape the byte[] part in a code block:

[Convert.ToBase64String(`byte[]`)](http://msdn.microsoft.com/en-us/library/dhx0d524(v=vs.110).aspx) 

And it worked fine. Is this expected behavior? Is there any way I can escape those square brackets inside my link?

2

1 Answer 1

10

Use backslashes to escape the literal brackets:

[Convert.ToBase64String(byte\[\])](http://msdn.microsoft.com/en-us/library/dhx0d524(v=vs.110).aspx) 

This is rendered as:

Convert.ToBase64String(byte[])

See the demo comment below this answer as well.

Using backslashes is part of the Markdown standard, see Backslash Escapes:

Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown’s formatting syntax.

2
  • Demo comment: Convert.ToBase64String(byte[]) Commented Mar 19, 2014 at 11:21
  • 7
    You'd think as a developer I would have tried a backslash!! Commented Mar 19, 2014 at 11:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.