Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

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
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:







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 .