From: robin Date: Sat, 12 May 2012 21:25:35 +0000 (+0200) Subject: Remove extra unneeded whitespace X-Git-Tag: 1.31.0-rc.0~23576^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=commitdiff_plain;h=84b8ca9801c0e1ad3bcd4c7d6d5d58c26a69d1b7;p=lhc%2Fweb%2Fwiklou.git Remove extra unneeded whitespace 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 --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index fa98dbf6a4..35f187f4d8 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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 ); diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index ddb84c3621..3a8a778a70 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -6064,8 +6064,6 @@ Special page transclusion !! input {{Special:Prefixindex/Xyzzyx}} !! result -


-

Xyzzyx
!! end @@ -6077,11 +6075,7 @@ Special page transclusion twice (bug 5021) {{Special:Prefixindex/Xyzzyx}} {{Special:Prefixindex/Xyzzyx}} !! result -


-

Xyzzyx
-


-

Xyzzyx
!! end