escaping backticks not working

Milian Wolff mail at milianw.de
Fri Jun 30 08:53:59 EDT 2006


Am Freitag, 30. Juni 2006 14:39 schrieb Michel Fortin:

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


Ok, so the version with double start- and end-ticks does work, the other one
not!

`There is a literal backtick (\\`) here.`
``There is a literal backtick (`) here.``

These two examples are listed on the link you posted above, the first one
creates the following output:

<p><code>There is a literal backtick (\\</code>) here.`</p>

I used both, the original and the php dingus.

So either you should update the markdown syntax page or (what I would prefer)
implement a way to escape backticks in these cases.
--
Milian Wolff
http://milianw.de


More information about the Markdown-Discuss mailing list