jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/392190 )
Change subject: Correctly expand optional parameters during Index: pages rendering ...................................................................... Correctly expand optional parameters during Index: pages rendering Bug: T180664 Change-Id: I9ab1fdf7711587bf88cb1f9d745b4b0275466d45 --- M includes/index/ParserHelper.php M tests/phpunit/index/ParserHelperTest.php 2 files changed, 12 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Tpt: Looks good to me, approved diff --git a/includes/index/ParserHelper.php b/includes/index/ParserHelper.php index 80c3af8..bebe4a5 100644 --- a/includes/index/ParserHelper.php +++ b/includes/index/ParserHelper.php @@ -20,7 +20,7 @@ public function __construct( Title $title = null, ParserOptions $options ) { $this->parser = new Parser(); - $this->parser->startExternalParse( $title, $options, Parser::OT_PLAIN ); + $this->parser->startExternalParse( $title, $options, Parser::OT_PREPROCESS ); } /** diff --git a/tests/phpunit/index/ParserHelperTest.php b/tests/phpunit/index/ParserHelperTest.php index 2f8000f..081babe 100644 --- a/tests/phpunit/index/ParserHelperTest.php +++ b/tests/phpunit/index/ParserHelperTest.php @@ -23,7 +23,7 @@ [ '{{{foo|}}}', [ 'bar' => 'baz' ], - '{{{foo|}}}' + '' ], [ '{{{bar|}}}', @@ -40,6 +40,16 @@ [ 'bar' => '<indicator name="foo"/>baz' ], '<indicator name="foo"/>baz' ], + [ + '<noinclude>foo</noinclude>', + [ 'bar' => 'baz' ], + '' + ], + [ + '<includeonly>foo</includeonly>', + [ 'bar' => 'baz' ], + 'foo' + ], ]; } -- To view, visit https://gerrit.wikimedia.org/r/392190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ab1fdf7711587bf88cb1f9d745b4b0275466d45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Tpt <thoma...@hotmail.fr> Gerrit-Reviewer: Samwilson <s...@samwilson.id.au> Gerrit-Reviewer: Tpt <thoma...@hotmail.fr> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits