[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Correctly expand optional parameters during Index: pages ren...

2017-11-18 Thread jenkins-bot (Code Review)
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' => 'baz' ],
'baz'
],
+   [
+   'foo',
+   [ 'bar' => 'baz' ],
+   ''
+   ],
+   [
+   'foo',
+   [ '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 
Gerrit-Reviewer: Samwilson 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Correctly expand optional parameters during Index: pages ren...

2017-11-18 Thread Tpt (Code Review)
Tpt has uploaded a new change for review. ( 
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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/90/392190/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' => 'baz' ],
'baz'
],
+   [
+   'foo',
+   [ 'bar' => 'baz' ],
+   ''
+   ],
+   [
+   'foo',
+   [ 'bar' => 'baz' ],
+   'foo'
+   ],
];
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/392190
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ab1fdf7711587bf88cb1f9d745b4b0275466d45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Correctly expand optional parameters during Index: pages ren...

2017-11-18 Thread Tpt (Code Review)
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' => 'baz' ],
'baz'
],
+   [
+   'foo',
+   [ 'bar' => 'baz' ],
+   ''
+   ],
+   [
+   'foo',
+   [ '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 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits