From 7936e29ba550378ec6e13b8b5775e3256fb6fa13 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 17 Jun 2004 17:29:54 +0000 Subject: [PATCH] * doExponant() function. Convert ^^th^^ in th. The function call is commented --- includes/Parser.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/Parser.php b/includes/Parser.php index 5d6a7c7bcc..ff8a94f272 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -786,6 +786,7 @@ cl_sortkey" ; $text = $wgDateFormatter->reformat( $this->mOptions->getDateFormat(), $text ); } $text = $this->doAllQuotes( $text ); + // $text = $this->doExponant( $text ); $text = $this->replaceExternalLinks( $text ); $text = $this->replaceInternalLinks ( $text ); $text = $this->replaceInternalLinks ( $text ); @@ -805,6 +806,16 @@ cl_sortkey" ; wfProfileOut( $fname ); return $text; } + + # Parse ^^ tokens and return html + /* private */ function doExponant ( $text ) + { + $fname = 'Parser::doExponant'; + wfProfileIn( $fname); + $text = preg_replace('/\^\^(.*)\^\^/','\\1', $text); + wfProfileOut( $fname); + return $text; + } # Parse headers and return html /* private */ function doHeadings( $text ) { -- 2.20.1