From c10861fdf77486fae8075457437c0a36969ee8a0 Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Tue, 21 Sep 2004 06:54:18 +0000 Subject: [PATCH] fix bug where __MWTEMPLATESECTION__ was being used with subst: --- includes/Parser.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 397691516a..bebf3d3bca 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1845,10 +1845,12 @@ class Parser } else { # replace ==section headers== # XXX this needs to go away once we have a better parser. - for ( $i = 1; $i <= 6; ++$i ) { - $h = substr( '======', 0, $i ); - $text = preg_replace( "/^{$h}([^=].*){$h}\\s?$/m", - "${h}\\1 __MWTEMPLATESECTION__${h}\\2", $text ); + if ( $this->mOutputType != OT_WIKI ) { + for ( $i = 1; $i <= 6; ++$i ) { + $h = substr( '======', 0, $i ); + $text = preg_replace( "/^{$h}([^=].*){$h}\\s?$/m", + "${h}\\1 __MWTEMPLATESECTION__${h}\\2", $text ); + } } return $text; } -- 2.20.1