From: Ævar Arnfjörð Bjarmason Date: Sat, 9 Apr 2005 00:31:40 +0000 (+0000) Subject: * (bug 87): Category tags produce ugly whitespace X-Git-Tag: 1.5.0alpha1~336 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=5b67454ed97e78399aac81c18a1a912eda9cb06b;p=lhc%2Fweb%2Fwiklou.git * (bug 87): Category tags produce ugly whitespace --- diff --git a/includes/Parser.php b/includes/Parser.php index 1f3eb330a8..b4e4b7317d 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1291,7 +1291,13 @@ class Parser } $wgLinkCache->addCategoryLinkObj( $nt, $sortkey ); $this->mOutput->addCategoryLink( $t ); - $s .= $prefix . $trail ; + + /** + * Strip the whitespace Category links produce, see bug 87 + * @todo We might want to use trim($tmp, "\n") here. + */ + $tmp = $prefix . $trail; + $s .= trim($tmp) == '' ? '': $tmp; wfProfileOut( "$fname-category" ); continue;