From 248f0aedf1a4ac749c486cf1a396e1b5120ff369 Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Fri, 9 Apr 2004 08:17:59 +0000 Subject: [PATCH] refix xhtml (I'm going by trial and error here) --- includes/Parser.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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 ) ) { -- 2.20.1