This was naïve, the linked bug documents a case where endTag() was
called despite children of the p-wrap still being in TreeBuilder's
stack. Instead, wait for the parent of the p-wrap to have endTag()
called on it, I've submitted a patch which will clean up the node in
that case.
Bug: T200827
Change-Id: I34694813eace9cadabf2db8f9ccca83d1368cfad
(cherry picked from commit
10c8cfea305ec1d450b16ad54ebddb5f910016f4)
$pElement = $parentData->childPElement;
$parentData->childPElement = null;
$newRef = $refElement->userData;
- $this->endTag( $pElement, $sourceStart, 0 );
} elseif ( $under && $parentData->isSplittable
&& (bool)$parentData->ancestorPNode !== $inline
) {
'<i><blockquote>x</i></blockquote>',
'<i></i><blockquote><p><i>x</i></p></blockquote>',
],
+ [
+ 'p-wrap ended by reparenting (T200827)',
+ '<i><blockquote><p></i>',
+ '<i></i><blockquote><p><i></i></p><p><i></i></p></blockquote>',
+ ],
];
public function provider() {