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;
$text .= $this->closeParagraph();
$text .= "<" . $newSection . ">";
$this->mLastSection = $newSection;
- } else if ( $this->mLastSection == 'p') {
+ } else if ( $this->mLastSection == 'p' and '' == $oLine) {
$text .= '<br />';
}
} else if ( $this->mLastSection == $newSection and $newSection != 'p' ) {