From 3df865dc6b6cc1144899923f0fb4dd4a890bbe41 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 26 May 2004 18:11:52 +0000 Subject: [PATCH] timelines now in strip() --- includes/Parser.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/includes/Parser.php b/includes/Parser.php index 6b8c27502d..ef2f4940e0 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -192,6 +192,7 @@ class Parser $render = ($this->mOutputType == OT_HTML); $nowiki_content = array(); $hiero_content = array(); + $timeline_content = array(); $math_content = array(); $pre_content = array(); $comment_content = array(); @@ -217,6 +218,15 @@ class Parser $hiero_content[$marker] = "$content"; } } + + $text = Parser::extractTags("timeline", $text, $timeline_content, $uniq_prefix); + foreach( $timeline_content as $marker => $content ){ + if( $render && $GLOBALS['wgUseTimeline']){ + $timeline_content[$marker] = renderTimeline( $content ); + } else { + $timeline_content[$marker] = "$content"; + } + } $text = Parser::extractTags("math", $text, $math_content, $uniq_prefix); foreach( $math_content as $marker => $content ){ @@ -250,6 +260,7 @@ class Parser if ( $state ) { $state['nowiki'] = $state['nowiki'] + $nowiki_content; $state['hiero'] = $state['hiero'] + $hiero_content; + $state['timeline'] = $state['timeline'] + $timeline_content; $state['math'] = $state['math'] + $math_content; $state['pre'] = $state['pre'] + $pre_content; $state['comment'] = $state['comment'] + $comment_content; @@ -257,6 +268,7 @@ class Parser $state = array( 'nowiki' => $nowiki_content, 'hiero' => $hiero_content, + 'timeline' => $timeline_content, 'math' => $math_content, 'pre' => $pre_content, 'comment' => $comment_content -- 2.20.1