escaping backticks not working

Michel Fortin michel.fortin at michelf.com
Fri Jun 30 08:39:40 EDT 2006


Le 30 juin 2006 à 7:36, Milian Wolff a écrit :


> Backticks can't be escaped in both .pl and .php Markdown:

>

> Text `escaped backtick: \` this should be code` Text

>

> Creates the following output:

>

> <p>Text <code>escaped backtick: \</code> this should be code`

> Text</p>


That's correct. Escapes do not work within code spans or code block:
they are taken as literals on purpose so you don't have to escape
them. It wouldn't be great if you had to double each backslash in a
code snippet just to work around Markdown's escapes.

If you need to include a backtick inside a code span, you'll have to
use more backticks to surround the code. This:

Text ``escaped backtick: ` this should be code`` Text

should give the result you expected. Take a look at the code span
syntax for more details:

<http://daringfireball.net/projects/markdown/syntax#code>


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/




More information about the Markdown-Discuss mailing list