Closed mn4367 closed 9 years ago
Nothing inside an HTML block element is being influenced by anything outside. The "unbalanced" whitespace inside your outermost <div>
is causing the irregularities -- meaning that the innermost <div>
is not a block, but rather two unrelated tags (to MMD) that look related to you (<div>
and </div>
).
The last example you show is the correct one, where the innermost <div>
is actually a Markdown block element, which is why you get the output you expect.
I agree that MMD shouldn't produce invalid HTML, but if you give it "incorrect" HTML/MMD there's not much I can do about it.
The following input ...
will lead to
which is correct. Neither a problem with this input:
But this one produces an invalid nesting of tags:
Maybe it's a corner case but it rather shouldn't produce invalid XML/HTML. I'd prefer a rule where everything inside an HTML block element is never influenced by anything outside this block element, but I have to admit that it's probably not easy to achieve. One further observation, this input "corrects" the problem which seems to be a bit strange: