From ec97944263221303a48f6d1927fd8364424ff0fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 25 Oct 2005 07:35:48 +0000 Subject: [PATCH] * New including feature: , see parsertests for uses --- includes/Parser.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/Parser.php b/includes/Parser.php index 8cc649bd78..7d76377be6 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -766,6 +766,7 @@ class Parser wfProfileIn( $fname ); # Remove tags and sections + $text = strtr( $text, array( '' => '' , '' => '' ) ); $text = strtr( $text, array( '' => '', '' => '') ); $text = preg_replace( '/.*?<\/includeonly>/s', '', $text ); @@ -2490,6 +2491,12 @@ class Parser $this->mTemplatePath[$part1] = 1; if( $this->mOutputType == OT_HTML ) { + if ( in_string( '', $text ) && in_string( '', $text ) ) { + preg_match_all( '/(.*?)<\/onlyinclude>/s', $text, $m ); + $text = ''; + foreach ($m[1] as $piece) + $text .= $piece; + } # Remove sections and tags $text = preg_replace( '/.*?<\/noinclude>/s', '', $text ); $text = strtr( $text, array( '' => '' , '' => '' ) ); -- 2.20.1