From: Alexandre Emsenhuber Date: Tue, 28 Jul 2009 20:16:17 +0000 (+0000) Subject: Per Simetrical's comment on r53832: only trim if there're newlines X-Git-Tag: 1.31.0-rc.0~40661 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=afe90f6ffc616b3bf4b3811ce2268ebc0c493eb1;p=lhc%2Fweb%2Fwiklou.git Per Simetrical's comment on r53832: only trim if there're newlines --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index aaf848fec1..ad4d732d31 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1705,7 +1705,7 @@ class Parser if ( $ns == NS_CATEGORY ) { wfProfileIn( __METHOD__."-category" ); - $s = rtrim( $s, "\n" ); # bug 87 + $s = preg_replace( "/(\s*\n)+\s*$/m", '', $s ); # bug 87 if ( $wasblank ) { $sortkey = $this->getDefaultSort();