1

I have a code snippit like:

console.log('`', '...')

The first argument to log here is quote, back-tick, quote.

I would like to embed this in a sentence in a markdown document like:

this code `code` is foo.

But, when I try this:

this code `console.log('`', '...')` is foo.

it's not coming out right because of the nested back-tick characters.

Any advice on how to correctly escape the back-ticks?

Jonathan.Brink
  • 23,757
  • 20
  • 73
  • 115
  • Can you show us your desired output at least in terms of chracters? I am not seeing a problem here. – Tim Biegeleisen May 19 '16 at 01:05
  • @TimBiegeleisen The goal here is to make the code snippit (which includes the ` character) appear in a code block. If you enter my attempt above into a tool like http://dillinger.io/ you'll see that the formatting is messed up – Jonathan.Brink May 19 '16 at 01:13

1 Answers1

3

Use double backticks around the code block:

``console.log('`', '...')``

This has been tested on dillinger.io and it appears to be working.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360