From c5d47384c01bd5d7b8519e92900a7cdfe82bb959 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Mon, 5 Apr 2004 11:34:13 +0000 Subject: [PATCH] no br if line contains whitespace, no empty line added after parsing interwiki language links --- includes/Parser.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 5f040b62c4..fa5aa38ec6 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -843,8 +843,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 $s; + return (trim($s) == '')? '': $s; } if( $ns == $image ) { $s .= $prefix . $sk->makeImageLinkObj( $nt, $text ) . $trail; @@ -1049,7 +1048,7 @@ class Parser $text .= $this->closeParagraph(); $text .= "<" . $newSection . ">"; $this->mLastSection = $newSection; - } else if ( $this->mLastSection == 'p') { + } else if ( $this->mLastSection == 'p' and '' == $oLine) { $text .= '
'; } } else if ( $this->mLastSection == $newSection and $newSection != 'p' ) { -- 2.20.1