From 03c5e3c266dd27adf9f865561869cb8c42f14c55 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 17 Jan 2008 04:02:57 +0000 Subject: [PATCH] It was a bit too early to remove OnlyIncludeReplacer... still used by Parser_OldPP. --- includes/Parser.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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() */ -- 2.20.1