Escaping inside code blocks?

Andrea Censi andrea at censi.org
Sat Dec 30 05:13:54 EST 2006


I am doing unit-tests for Maruku and every once in a while I run into
some doubts.
I am posting a lot to the list, but all of these messages should be
in-topic (tell me if not).

Consider the input:
---
`There is a literal backtick (\`) here.`

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

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

The documentation says that line 2 and 3 are equivalent.
(http://maruku.rubyforge.org/markdown_syntax.html#code)

But this is Markdown.pl's result:
---
<p><code>There is a literal backtick (\</code>) here.`</p>

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

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

Question 1:
How do you do escaping in code blocks in your implementation?

Question 2:
How should I do escaping in my implementation?

Question 2:
What is the Markdown syntax for representing:
1) an inline code span whose string is "`" (only a backtick)
2) an inline code span whose string is "\" (only a backslash)
?

--
Andrea Censi
"Life is too important to be taken seriously" (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi


More information about the Markdown-Discuss mailing list