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

In a Stackoverflow question/answer box, what is the markdown to render this, not as a code fragement, but in normal narrative text.


The above is only shown in a code fragment, as that is the only way I know how to show it to you. If instead I write the same text in normal narrative, this is what I get...


Perhaps there is some markdown to achieve this? Thanks if you can advise.

Testing Murgatroid's solution


share|improve this question
I'm curious why you would want to do that. The inline code syntax (backticks) is made for precisely this sort of thing. Can you explain? – balpha Sep 14 '12 at 8:00

3 Answers 3

up vote 3 down vote accepted

You can use a backslash (\) to escape the brackets: "myArray[2][1]" can be written like


or, as you pointed out, you only have to escape the open bracket, so the following will generate the same output

share|improve this answer
Thanks. With a bit of testing, I found that only the [ needs to be escaped. – Sean B. Durkin Sep 14 '12 at 3:55

If you don't have any links using the [] notation, this is rendered literally:


You can still have links using inline syntax:





[yahoo!]: http://www.google.com


share|improve this answer
Helpful, but it's a pain to change the link syntax. Murgatroid's solution is a better fit for my needs. Thanks anyway. – Sean B. Durkin Sep 14 '12 at 3:51

Use backticks (`) for inline code.


Blah blah `myArray[2][1]` blah blah...


Blah blah myArray[2][1] blah blah...

share|improve this answer
he did ask specifically how to write brackets outside of code blocks – murgatroid99 Sep 15 '12 at 0:18
@murgatroid99: I'm assuming he meant outside paragraph-level code blocks. – hammar Sep 15 '12 at 1:11
could be. I didn't think of that – murgatroid99 Sep 15 '12 at 1:33

You must log in to answer this question.

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