From: Erik Moeller Date: Fri, 9 Apr 2004 08:17:59 +0000 (+0000) Subject: refix xhtml (I'm going by trial and error here) X-Git-Tag: 1.3.0beta1~535 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=248f0aedf1a4ac749c486cf1a396e1b5120ff369;p=lhc%2Fweb%2Fwiklou.git refix xhtml (I'm going by trial and error here) --- diff --git a/includes/Parser.php b/includes/Parser.php index 83f93d81c8..5fb8e6e2b5 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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 .= '

'; - } - } 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 ) ) {