From afe90f6ffc616b3bf4b3811ce2268ebc0c493eb1 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 28 Jul 2009 20:16:17 +0000 Subject: [PATCH] Per Simetrical's comment on r53832: only trim if there're newlines --- includes/parser/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.20.1