From: Tim Starling Date: Thu, 17 Jan 2008 04:02:57 +0000 (+0000) Subject: It was a bit too early to remove OnlyIncludeReplacer... still used by Parser_OldPP. X-Git-Tag: 1.31.0-rc.0~49947 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=03c5e3c266dd27adf9f865561869cb8c42f14c55;p=lhc%2Fweb%2Fwiklou.git It was a bit too early to remove OnlyIncludeReplacer... still used by Parser_OldPP. --- diff --git a/includes/Parser.php b/includes/Parser.php index 9645c2eb67..6132cc871e 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -5314,6 +5314,22 @@ class StripState { } } +/** + * @todo document, briefly. + * @addtogroup Parser + */ +class OnlyIncludeReplacer { + var $output = ''; + + function replace( $matches ) { + if ( substr( $matches[1], -1 ) == "\n" ) { + $this->output .= substr( $matches[1], 0, -1 ); + } else { + $this->output .= $matches[1]; + } + } +} + /** * An expansion frame, used as a context to expand the result of preprocessToDom() */