jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Make line breaks in <blockquote> behave like <div> (bug 
6200)."  See bug 52763
......................................................................


Revert "Make line breaks in <blockquote> behave like <div> (bug 6200)."  See 
bug 52763

This reverts commit b9d0e5e4e763aa58647f88739ed0e5682685d064.

Change-Id: I9451f7d11fe01085e4289b21b2e905751bdbf800
---
M RELEASE-NOTES-1.22
M includes/parser/Parser.php
M tests/parser/parserTests.txt
3 files changed, 19 insertions(+), 55 deletions(-)

Approvals:
  GWicke: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index b9890a0..cfe553e 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -255,7 +255,6 @@
   revision as second argument now, rather than just the current section.
 * (bug 49694) $wgSpamRegex is now also applied on the new section headline text
   adding a new topic on a page
-* (bug 6200) line breaks in <blockquote> are handled like they are in <div>
 * (bug 41756) Improve treatment of multiple comments on a blank line.
 
 === API changes in 1.22 ===
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 1bba876..8fdf407 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2450,10 +2450,10 @@
                                wfProfileIn( __METHOD__ . "-paragraph" );
                                # No prefix (not in list)--go to paragraph mode
                                # XXX: use a stack for nestable elements like 
span, table and div
-                               $openmatch = preg_match( 
'/(?:<table|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS',
 $t );
+                               $openmatch = preg_match( 
'/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS',
 $t );
                                $closematch = preg_match(
-                                       
'/(?:<\\/table|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|' .
-                                       
'<td|<th|<\\/?blockquote|<\\/?div|<hr|<\\/pre|<\\/p|' . $this->mUniqPrefix . 
'-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
+                                       
'/(?:<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|' .
+                                       '<td|<th|<\\/?div|<hr|<\\/pre|<\\/p|' . 
$this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
                                if ( $openmatch or $closematch ) {
                                        $paragraphStack = false;
                                        # TODO bug 5718: paragraph closed
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 41d49d1..0715ae6 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1352,6 +1352,8 @@
 
 !! end
 
+# Expected output in the following test is not really expected (there should be
+# <pre> in the output) -- it's only testing for well-formedness.
 !! test
 Bug 6200: Preformatted in <blockquote>
 !! input
@@ -1360,53 +1362,7 @@
 </blockquote>
 !! result
 <blockquote>
-<pre>Blah
-</pre>
-</blockquote>
-
-!! end
-
-!! test
-Bug 51086: Double newlines in blockquotes should be turned into paragraphs
-!! input
-<blockquote>
-Foo
-
-Bar
-</blockquote>
-!! result
-<blockquote>
-<p>Foo
-</p><p>Bar
-</p>
-</blockquote>
-
-!! end
-
-!! test
-Bug 15491: <ins>/<del> in blockquote
-!! input
-<blockquote>
-Foo <del>bar</del> <ins>baz</ins> quux
-</blockquote>
-!! result
-<blockquote>
-<p>Foo <del>bar</del> <ins>baz</ins> quux
-</p>
-</blockquote>
-
-!! end
-
-# Note that the p-wrapping is newline sensitive, which could be
-# considered a bug: tidy will wrap only the 'Foo' in the example
-# below in a <p> tag. (see comment 23-25 of bug #6200)
-!! test
-Bug 15491: <ins>/<del> in blockquote (2)
-!! input
-<blockquote>Foo <del>bar</del> <ins>baz</ins> quux
-</blockquote>
-!! result
-<blockquote>Foo <del>bar</del> <ins>baz</ins> quux
+ Blah
 </blockquote>
 
 !! end
@@ -1921,8 +1877,7 @@
 </pre>
 </center>
 <blockquote>
-<pre>foo
-</pre>
+ foo
 </blockquote>
 <table><tr><td>
 <pre>foo
@@ -13523,6 +13478,9 @@
 </p>
 !! end
 
+# Expected output in the following test is not necessarily expected (there
+# should probably be <p> tags inside the <blockquote> in the output) -- it's
+# only testing for well-formedness.
 !! test
 Bug 6200: blockquotes and paragraph formatting
 !! input
@@ -13535,8 +13493,7 @@
  baz
 !! result
 <blockquote>
-<p>foo
-</p>
+foo
 </blockquote>
 <p>bar
 </p>
@@ -14216,6 +14173,8 @@
 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
 !! test
 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
+!! options
+disabled
 !! input
 <blockquote>Line one
 
@@ -14228,6 +14187,8 @@
 
 !! test
 Bug 6200: paragraphs inside blockquotes (extra line break on open)
+!! options
+disabled
 !! input
 <blockquote>
 Line one
@@ -14243,6 +14204,8 @@
 
 !! test
 Bug 6200: paragraphs inside blockquotes (extra line break on close)
+!! options
+disabled
 !! input
 <blockquote>Line one
 
@@ -14258,6 +14221,8 @@
 
 !! test
 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
+!! options
+disabled
 !! input
 <blockquote>
 Line one

-- 
To view, visit https://gerrit.wikimedia.org/r/78967
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9451f7d11fe01085e4289b21b2e905751bdbf800
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to