Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backticks inside inline code blocks #99

Open
philsturgeon opened this issue Mar 11, 2015 · 2 comments
Open

Backticks inside inline code blocks #99

philsturgeon opened this issue Mar 11, 2015 · 2 comments
Milestone

Comments

@philsturgeon
Copy link

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. :)

@cebe
Copy link
Owner

cebe commented Mar 12, 2015

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

@cebe
Copy link
Owner

cebe commented Mar 12, 2015

I am considering to add a commonmark compatible class however when I find the time for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants