Merge "RemexCompatMunger: Don't call endTag() in case B/b" into REL1_31
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 22 Oct 2018 02:14:00 +0000 (02:14 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 22 Oct 2018 02:14:00 +0000 (02:14 +0000)
includes/tidy/RemexCompatMunger.php
tests/phpunit/includes/tidy/RemexDriverTest.php

index ab2ba46..e6351e2 100644 (file)
@@ -262,7 +262,6 @@ class RemexCompatMunger implements TreeHandler {
                        $pElement = $parentData->childPElement;
                        $parentData->childPElement = null;
                        $newRef = $refElement->userData;
-                       $this->endTag( $pElement, $sourceStart, 0 );
                } elseif ( $under && $parentData->isSplittable
                        && (bool)$parentData->ancestorPNode !== $inline
                ) {
index b20557f..a5ebaa5 100644 (file)
@@ -257,6 +257,11 @@ class RemexDriverTest extends MediaWikiTestCase {
                        '<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() {