Index: branches/wmf-deployment/includes/parser/Parser.php |
— | — | @@ -1726,7 +1726,7 @@ |
1727 | 1727 | |
1728 | 1728 | if ( $ns == NS_CATEGORY ) { |
1729 | 1729 | wfProfileIn( __METHOD__."-category" ); |
1730 | | - $s = preg_replace( "/(\s*\n)+\s*$/D", '', $s ); # bug 87 |
| 1730 | + $s = rtrim($s . "\n"); # bug 87 |
1731 | 1731 | |
1732 | 1732 | if ( $wasblank ) { |
1733 | 1733 | $sortkey = $this->getDefaultSort(); |
— | — | @@ -1742,7 +1742,7 @@ |
1743 | 1743 | * Strip the whitespace Category links produce, see bug 87 |
1744 | 1744 | * @todo We might want to use trim($tmp, "\n") here. |
1745 | 1745 | */ |
1746 | | - $s .= trim( $prefix . $trail, "\n" ) == '' ? '' : $prefix . $trail; |
| 1746 | + $s .= trim($prefix . $trail, "\n") == '' ? '': $prefix . $trail; |
1747 | 1747 | |
1748 | 1748 | wfProfileOut( __METHOD__."-category" ); |
1749 | 1749 | continue; |