It was a bit too early to remove OnlyIncludeReplacer... still used by Parser_OldPP.
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 17 Jan 2008 04:02:57 +0000 (04:02 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 17 Jan 2008 04:02:57 +0000 (04:02 +0000)
includes/Parser.php

index 9645c2e..6132cc8 100644 (file)
@@ -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()
  */