From 5830e7c6f930dc4b5be928cd8612d3057216429c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 2 Jun 2004 08:01:48 +0000 Subject: [PATCH] Reverting to previous revision; this broke at least one example and I'm not sure why. --- includes/Parser.php | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 944353ff53..2bb28ede33 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -214,23 +214,18 @@ class Parser $text = Parser::extractTags("nowiki", $text, $nowiki_content, $uniq_prefix); foreach( $nowiki_content as $marker => $content ){ - if( $render ){ + //if( $render ){ //# use span to mark nowiki areas, note the trailing whitespace in span to avoid collisions with other spans //$nowiki_content[$marker] = ''.wfEscapeHTMLTagsOnly( $content ).""; - $nowiki_content[$marker] = $content; - } else { + //} else { $nowiki_content[$marker] = "$content"; - } + //} } $text = Parser::extractTags("hiero", $text, $hiero_content, $uniq_prefix); foreach( $hiero_content as $marker => $content ){ - if( $render ) { - if( $GLOBALS['wgUseWikiHiero'] ) { - $hiero_content[$marker] = WikiHiero( $content, WH_MODE_HTML); - } else { - $hiero_content[$marker] = "<hiero>$content</hiero>"; - } + if( $render && $GLOBALS['wgUseWikiHiero']){ + $hiero_content[$marker] = WikiHiero( $content, WH_MODE_HTML); } else { $hiero_content[$marker] = "$content"; } @@ -238,12 +233,8 @@ class Parser $text = Parser::extractTags("timeline", $text, $timeline_content, $uniq_prefix); foreach( $timeline_content as $marker => $content ){ - if( $render ) { - if( $render && $GLOBALS['wgUseTimeline']){ - $timeline_content[$marker] = renderTimeline( $content ); - } else { - $timeline_content[$marker] = "<timeline>$content</timeline>"; - } + if( $render && $GLOBALS['wgUseTimeline']){ + $timeline_content[$marker] = renderTimeline( $content ); } else { $timeline_content[$marker] = "$content"; } @@ -255,7 +246,7 @@ class Parser if( $this->mOptions->getUseTeX() ) { $math_content[$marker] = renderMath( $content ); } else { - $math_content[$marker] = "<math>$content</math>"; + $math_content[$marker] = "<math>$content<math>"; } } else { $math_content[$marker] = "$content"; @@ -264,7 +255,7 @@ class Parser $text = Parser::extractTags("pre", $text, $pre_content, $uniq_prefix); foreach( $pre_content as $marker => $content ){ - if( $render ) { + if( $render ){ $pre_content[$marker] = "
" . wfEscapeHTMLTagsOnly( $content ) . "
"; } else { $pre_content[$marker] = "
$content
"; -- 2.20.1