markdown
markdown copied to clipboard
Backticks inside inline code blocks
This is one of those things that would be made easier with CommonMark compliance, but even without that as a goal seems like a bug to me.
Example
Please remove the `\` from ` \``` `
Babelmark
http://johnmacfarlane.net/babelmark2/?text=Please+remove+the+%60%5C%60+from+%60+%5C%60%60%60+%60%0A
Expected Output
<p>Please remove the <code>\</code> from <code>\```</code></p>
Actual Output
p>Please remove the <code>\</code> from <code> \</code><code>` </code></p>
Just a friendly report. I'm not trying to use cebe/markdown for this, just spotted it in the babelfish output while debugging something else. :)
Thanks for reporting, already seen your tweet about it :)
The implementation is correct according to grubers markdown syntax description: https://daringfireball.net/projects/markdown/syntax#code According to that, if you want to include a literal backtick, you have to surround the whole code tag with more than one backtick or in this case the number of sequential backticks + 1:
http://markdown.cebe.cc/try?flavor=default&text=Please+remove+the+%60%60+from+%60%60%60%60+%60%60%60+%60%60%60%60
I am considering to add a commonmark compatible class however when I find the time for it.