From: River Tarnell Date: Tue, 21 Sep 2004 06:54:18 +0000 (+0000) Subject: fix bug where __MWTEMPLATESECTION__ was being used with subst: X-Git-Tag: 1.5.0alpha1~1919 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=c10861fdf77486fae8075457437c0a36969ee8a0;p=lhc%2Fweb%2Fwiklou.git fix bug where __MWTEMPLATESECTION__ was being used with subst: --- 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; }