r2978 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r2977‎ | r2978 | r2979 >
Date:11:34, 5 April 2004
Author:gabrielwicke
Status:old
Tags:
Comment:
no br if line contains whitespace, no empty line added after parsing interwiki language links
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -843,8 +843,7 @@
844844 if( $noforce ) {
845845 if( $iw && $this->mOptions->getInterwikiMagic() && $nottalk && $wgLang->getLanguageName( $iw ) ) {
846846 array_push( $this->mOutput->mLanguageLinks, $nt->getPrefixedText() );
847 - $s .= $prefix . $trail;
848 - return $s;
 847+ return (trim($s) == '')? '': $s;
849848 }
850849 if( $ns == $image ) {
851850 $s .= $prefix . $sk->makeImageLinkObj( $nt, $text ) . $trail;
@@ -1049,7 +1048,7 @@
10501049 $text .= $this->closeParagraph();
10511050 $text .= "<" . $newSection . ">";
10521051 $this->mLastSection = $newSection;
1053 - } else if ( $this->mLastSection == 'p') {
 1052+ } else if ( $this->mLastSection == 'p' and '' == $oLine) {
10541053 $text .= '<br />';
10551054 }
10561055 } else if ( $this->mLastSection == $newSection and $newSection != 'p' ) {

Status & tagging log