From 2f7946f0bb7463d18d9bca501c4dfe06bcea8295 Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Fri, 9 Apr 2004 11:26:27 +0000 Subject: [PATCH] make doBlockLevels last parser stage again, and fix missing paragraphs from intro bug --- includes/Parser.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 5fb8e6e2b5..198c84dab4 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -430,8 +430,8 @@ class Parser } $text = $this->replaceExternalLinks( $text ); - $text = $this->doBlockLevels( $text, $linestart ); $text = $this->doTokenizedParser ( $text ); + $text = $this->doTableStuff ( $text ) ; $text = $this->formatHeadings( $text ); @@ -446,6 +446,8 @@ class Parser ); $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text ); + # needs to be called last + $text = $this->doBlockLevels( $text, $linestart ); $text .= $this->categoryMagic () ; wfProfileOut( $fname ); @@ -754,7 +756,7 @@ class Parser $txt = $lastToken["text"] . $txt; } else { $txt = $lastToken["type"] . $txt; - } + } } $s .= $txt; } @@ -1031,6 +1033,7 @@ class Parser } if ( 0 == $npl ) { # No prefix--go to paragraph mode $uniq_prefix = UNIQ_PREFIX; + $inBlockElem=false; if ( preg_match( "/(closeParagraph(); @@ -1039,7 +1042,7 @@ class Parser $text .= $this->closeParagraph(); $inBlockElem = false; } - if ( ! $inBlockElem ) { + if ( !$inBlockElem ) { if ( " " == $t{0} ) { $newSection = "pre"; $text .= $this->closeParagraph(); @@ -1423,6 +1426,7 @@ class Parser /* private */ function formatHeadings( $text ) { + return $text; $doNumberHeadings = $this->mOptions->getNumberHeadings(); $doShowToc = $this->mOptions->getShowToc(); if( !$this->mTitle->userCanEdit() ) { -- 2.20.1