-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
UNSAFE mode inserts <p> tags inside <pre> tag #102
Comments
This behaviour is per-spec, and isn't related to the safe/unsafe mode — see the CommonMark dingus (be sure to choose HTML on the right; you may have to refresh the page to load it properly). Read CommonMark §4.6 — in short, your To hit start condition 1, you'll need to separate the <div class="highlight">
<pre class="language-text" data-lang="text"> [1,] [2,]
[1,] ALPHA BETA
[2,] BETA ALPHA
</pre></div> This will cause a HTML block to span the entire |
Thank you for your detailed response @kivikakk with the links to the emulator and spec doc. However, spec or no spec, don't you think its weird that:
I shall try and take this up to the author(s) of the CommonMark.. |
No problems! It's weird, but one big rule for CommonMark is that it does not contain a full HTML parser, as that would significantly increase the complexity of implementing the CommonMark spec. In general, you can't paste in arbitrary HTML and hope that it'll be preserved as-is. Hence why the It's weird, but it's probably not going to change. The set of start conditions in §4.6 is a way to try to make it easier to embed some HTML without going all the way. (fwiw, while I'm not an author of the CommonMark spec itself, I have given input in the past and maintain a few of popular parsers for it.) |
This is probably the very reason why the Thanks once again, Ashe. 😃 |
Sample script
Result
The text was updated successfully, but these errors were encountered: