refix xhtml (I'm going by trial and error here)
authorErik Moeller <erik@users.mediawiki.org>
Fri, 9 Apr 2004 08:17:59 +0000 (08:17 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Fri, 9 Apr 2004 08:17:59 +0000 (08:17 +0000)
includes/Parser.php

index 83f93d8..5fb8e6e 100644 (file)
@@ -1047,19 +1047,11 @@ class Parser
                                        }
                                        else { $newSection = "p"; }
 
-                                       if ( '' == trim( $oLine ) ) {
-                                               if ( $this->mLastSection != 'p') {
-                                                       $text .= $this->closeParagraph();
-                                                       $text .= "<" . $newSection . ">";
-                                                       $this->mLastSection = $newSection;
-                                               } else if ( $this->mLastSection == 'p' and '' == $oLine) {
-                                                       $text .= '<p>';
-                                               }
-                                       } else if ( $this->mLastSection == $newSection and $newSection != 'p' ) {
+                                       if ( ( '' == trim( $oLine ) ) ||  ( $this->mLastSection == $newSection and $newSection != 'p' )) {
                                                $text .= $this->closeParagraph();
                                                $text .= "<" . $newSection . ">";
                                                $this->mLastSection = $newSection;
-                                       }
+                                       } 
                                }
                                if ( $inBlockElem &&
                                  preg_match( "/(<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|<\\/p<\\/div)/i", $t ) ) {