Open John-B opened 6 months ago
can you please explain better what is the issue here? i'm not sure if I understand it correctly.. do you have a failing test case?
If passed non-matching or open h tags, expected behaviour is to match closing h tag, but this is not working.
I do not see a relevant Masterminds or Drupal test. Quick manual test:
</h1> to </h2>. Or to </p>. Or by deleting </h1>
. Run again.<h1>Hello World</h1>
. Actual output is faulty HTML.
DOMDocument::Serialize
, which is called by Drupal's Html::normalize before Drupal 10, appears to fix mismatching tags, but HTML5-php does not.With DOMDocument,
Html::normalize()
on<h3>Heading</h2>
is giving<h3>Heading</h3>
. With HTL5-php,Html::normalize()
on<h3>Heading</h2>
is giving<h3>Heading</p>
.Arguably not a bug, though it has caused a regression in one use case (https://www.drupal.org/project/toc_api/issues/3416816)