The stack overflow do wrong displaying when \I try post this:

`cd \`echo -n "~"\``

It is displayed as: cd \echo -n "~"``

StackOverflow uses Markdown. Markdown provides backslash escapes for the backtick character: http://daringfireball.net/projects/markdown/syntax#backslash

Why the backtick escaping does not work inside backticks? It seems a bug

  • 1
    Looks like correct markdown rendering to me. Why do you think it should display differently? What do you think it should display as?
    – Oded
    Jul 23, 2015 at 10:04
  • Backtick escaping is not designed or specified to work inside backticks. You have to use something else (especially multiple backticks surrounding) for any markdown implementation to render it the way you want. Jul 23, 2015 at 15:16

1 Answer 1


Here are two ways to write markdown that displays the way (I think) you expect:

Code block (input is identical to output, just indented 4 spaces):

cd `echo -n "~"`

Inline code:

cd `echo -n "~"`

See How do I format my code blocks? for details - in particular the Backticks within backticks section.

  • And second paragraph says: that I may use escape backtick also, but it does not work. Jul 23, 2015 at 10:23
  • 1
    You mean the one that is about backticks in text? Not in code? Or do you mean the paragarph that is specifically about backticks in comments?
    – Oded
    Jul 23, 2015 at 10:24
  • There is noted that: space does not work in comments and I should escape the backtick. There is no any reason that the escaping not work inside backtick. Have 'stack exchange' reason to break escaping rules? (in compare to other soft where escaping rules are implemented). I agree with you that I should read manual, but that implementation is not expected. if I drive friend's car should I read car manual to escape unexpected behaviour? Definitely not. Jul 23, 2015 at 10:39
  • What escaping rules are being broken here exactly? We use markdown at Stack Exchange.
    – Oded
    Jul 23, 2015 at 10:45
  • 1
    Really? Markdown provides backslash escapes for the following characters: daringfireball.net/projects/markdown/syntax#backslash meta.stackexchange.com/questions/82718/… Why backtick escaping does not work inside backticks? (except comments) As I noted: there is no any reason to not work in my case Jul 23, 2015 at 11:09

You must log in to answer this question.

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