Closed notriddle closed 2 months ago
Hmm, this doesn’t have anything to do with block quotes, from what I understand?
What’s going on in these two cases is that the start condition of HTML kind 6 matches for <div
. But no block HTML start condition matches for <di
or <d
or <a
or whatever else (but with a >
, so <a>
, it would match HTML kind 7).
https://spec.commonmark.org/0.30/#html-blocks.
Some examples:
<div
> a
<di>
> b
<di
> c
The same happens for “containers” other than block quotes:
<div
* d
Or say headings:
<div
# e?
It's true that the <a
tag isn't the start of an HTML block, but it is valid inline HTML. Try this example:
<a
ping>
Right, but that’s something else. The inline rules/algos have nothing to do with how (block quotes and) HTML interact.
Which section of the spec do you think these test cases belong in, then?
From a quick glance, this seems close to the cases of https://spec.commonmark.org/0.30/#example-156 and 157? It has “emphasis” currently, and could also have say an ATX heading and a block quote?
@wooorm Okay, I sorted the examples under the HTML Block and Raw HTML sections.
Are there any additional blocking concerns for this patch?
Looks good to me!
This result makes sense, since inline HTML being inline implies that it is parsed after block quotes, while block HTML being copy-and-pasteable implies that it should eat Markdown syntax like block quotes. However, pulldown-cmark got this wrong, and apparently so do MD4C, markdown-it, and parsedown, according to Babelmark 3.