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

Can't have code blocks inside tags #596

Closed
TravisTheTechie opened this issue May 21, 2015 · 2 comments
Closed

Can't have code blocks inside tags #596

TravisTheTechie opened this issue May 21, 2015 · 2 comments

Comments

@TravisTheTechie
Copy link

$ node
> var m = require("marked");
undefined
> m("```\nThis is code\n```");
'<pre><code>This is code\n</code></pre>'
> m("<div>```\nThis is code\n```</div>");
'<div><code>This is code</code></div>'
> m("<div>\n```\nThis is code\n```\n</div>");
'<div>\n<code>This is code</code>\n</div>'

The first example works as expected. The second and third just do <code>, like it's inline. It's not tag specific, or least it doesn't appear to be...

> m("<abc>\n```\nThis is code\n```\n</abc>");
'<abc>\n<code>This is code</code>\n</abc>'

Just any code fences inside markup is assumed to be inline code instead of code blocks.

@joshbruce
Copy link
Member

#983

@Feder1co5oave
Copy link
Contributor

Only inline parsing is done inside html tags. So, no code blocks.

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

No branches or pull requests

3 participants