Index: trunk/phase3/includes/Parser.php |
— | — | @@ -843,8 +843,7 @@ |
844 | 844 | if( $noforce ) { |
845 | 845 | if( $iw && $this->mOptions->getInterwikiMagic() && $nottalk && $wgLang->getLanguageName( $iw ) ) { |
846 | 846 | array_push( $this->mOutput->mLanguageLinks, $nt->getPrefixedText() ); |
847 | | - $s .= $prefix . $trail; |
848 | | - return $s; |
| 847 | + return (trim($s) == '')? '': $s; |
849 | 848 | } |
850 | 849 | if( $ns == $image ) { |
851 | 850 | $s .= $prefix . $sk->makeImageLinkObj( $nt, $text ) . $trail; |
— | — | @@ -1049,7 +1048,7 @@ |
1050 | 1049 | $text .= $this->closeParagraph(); |
1051 | 1050 | $text .= "<" . $newSection . ">"; |
1052 | 1051 | $this->mLastSection = $newSection; |
1053 | | - } else if ( $this->mLastSection == 'p') { |
| 1052 | + } else if ( $this->mLastSection == 'p' and '' == $oLine) { |
1054 | 1053 | $text .= '<br />'; |
1055 | 1054 | } |
1056 | 1055 | } else if ( $this->mLastSection == $newSection and $newSection != 'p' ) { |