Tpt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392187 )
Change subject: Correctly expand optional parameters during Index: pages rendering ...................................................................... Correctly expand optional parameters during Index: pages rendering Bug: T180664 Change-Id: I8bd3a2494ad78168d4ed569c766eb642794972cb --- M includes/index/ParserHelper.php M tests/phpunit/index/ParserHelperTest.php 2 files changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/87/392187/1 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/392187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bd3a2494ad78168d4ed569c766eb642794972cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Tpt <thoma...@hotmail.fr> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits