From: Gabriel Wicke Date: Sun, 2 May 2004 21:27:56 +0000 (+0000) Subject: two bug fixes: html comments don't add a paragraph anymore, lang links don't eat... X-Git-Tag: 1.3.0beta1~161 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=96bdd88017c76866589e84d8aabea19ddce04c98;p=lhc%2Fweb%2Fwiklou.git two bug fixes: html comments don't add a paragraph anymore, lang links don't eat following text anymore --- diff --git a/includes/Parser.php b/includes/Parser.php index 2750a1c89e..1f28f5c344 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -879,7 +879,7 @@ class Parser if ( !$image ) { $image = Namespace::getImage(); } if ( !$special ) { $special = Namespace::getSpecial(); } if ( !$media ) { $media = Namespace::getMedia(); } - if ( !$category ) { $category = Namespace::getCategory(); ; } + if ( !$category ) { $category = Namespace::getCategory(); } $nottalk = !Namespace::isTalk( $this->mTitle->getNamespace() ); @@ -935,6 +935,7 @@ class Parser if( $noforce ) { if( $iw && $this->mOptions->getInterwikiMagic() && $nottalk && $wgLang->getLanguageName( $iw ) ) { array_push( $this->mOutput->mLanguageLinks, $nt->getPrefixedText() ); + $s .= $prefix . $trail ; return (trim($s) == '')? '': $s; } if( $ns == $image ) { @@ -1514,7 +1515,7 @@ class Parser $htmlattrs = $this->getHTMLattrs () ; # Remove HTML comments - $text = preg_replace( "//sU", "", $text ); + $text = preg_replace( "/\n?\n?/sU", "", $text ); $bits = explode( "<", $text ); $text = array_shift( $bits );