<ins>/<del> elements can be phrasing or flow
authorArlo Breault <abreault@wikimedia.org>
Thu, 12 Jul 2018 18:31:04 +0000 (14:31 -0400)
committerArlo Breault <abreault@wikimedia.org>
Fri, 13 Jul 2018 15:28:10 +0000 (11:28 -0400)
The changes to the parserTests.txt highlight the differing opinions that
doBlockLevels and Remex had on whether these should be paragraph wrapped.

Since the only time they wouldn't have been was when found on a line
with other flow tags, this likely isn't a behaviour that was depended on
in practice.  And, indeed, the task describes this as a bug.

A sampling of pages from an insource:/\<(ins|del)\>/ search on wiki bears
this out.

Bug: T17491
Change-Id: I311da777a63aa3c45013f2cfc090be35a022497e

includes/tidy/RemexCompatMunger.php
tests/parser/parserTests.txt

index 7cf7bbe..ab2ba46 100644 (file)
@@ -28,6 +28,7 @@ class RemexCompatMunger implements TreeHandler {
                "button" => true,
                "cite" => true,
                "code" => true,
+               "del" => true,
                "dfn" => true,
                "em" => true,
                "font" => true,
@@ -35,6 +36,7 @@ class RemexCompatMunger implements TreeHandler {
                "iframe" => true,
                "img" => true,
                "input" => true,
+               "ins" => true,
                "kbd" => true,
                "label" => true,
                "legend" => true,
index 0ae3f53..43b4572 100644 (file)
@@ -2496,6 +2496,11 @@ Foo <del>bar</del> <ins>baz</ins> quux
 </p>
 </blockquote>
 
+!! html+tidy
+<blockquote>
+<p>Foo <del>bar</del> <ins>baz</ins> quux
+</p>
+</blockquote>
 !! end
 
 !! test
@@ -2508,7 +2513,7 @@ T17491: <ins>/<del> in blockquote (2)
 </blockquote>
 
 !! html+tidy
-<blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
+<blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
 </p></blockquote>
 !! end