Remove extra unneeded whitespace
authorrobin <robinp.1273@gmail.com>
Sat, 12 May 2012 21:25:35 +0000 (23:25 +0200)
committerrobin <robinp.1273@gmail.com>
Sat, 12 May 2012 21:37:50 +0000 (23:37 +0200)
This whitespaces causes an extra empty paragraph between text and transcluding a special page.
When a heading precedes a transcluded special page, there is no difference and it's fine with or without this whitespace.

See for example http://incubator.wikimedia.org/w/index.php?title=Incubator:Sandbox&oldid=822299

Change-Id: I6b06006d921368619d3969660c244176344e8aff

includes/parser/Parser.php
tests/parser/parserTests.txt

index fa98dbf..35f187f 100644 (file)
@@ -3390,10 +3390,8 @@ class Parser {
                }
 
                # Replace raw HTML by a placeholder
-               # Add a blank line preceding, to prevent it from mucking up
-               # immediately preceding headings
                if ( $isHTML ) {
-                       $text = "\n\n" . $this->insertStripItem( $text );
+                       $text = $this->insertStripItem( $text );
                } elseif ( $nowiki && ( $this->ot['html'] || $this->ot['pre'] ) ) {
                        # Escape nowiki-style return values
                        $text = wfEscapeWikiText( $text );
index ddb84c3..3a8a778 100644 (file)
@@ -6064,8 +6064,6 @@ Special page transclusion
 !! input
 {{Special:Prefixindex/Xyzzyx}}
 !! result
-<p><br />
-</p>
 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
 
 !! end
@@ -6077,11 +6075,7 @@ Special page transclusion twice (bug 5021)
 {{Special:Prefixindex/Xyzzyx}}
 {{Special:Prefixindex/Xyzzyx}}
 !! result
-<p><br />
-</p>
 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
-<p><br />
-</p>
 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
 
 !! end