Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/235349
Change subject: Exit early from parse.js if selsering w/o source
......................................................................
Exit early from parse.js if selsering w/o source
Change-Id: I356649bff7e62997298c8cb454c13a2fa698d8cc
---
M tests/parse.js
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/49/235349/1
diff --git a/tests/parse.js b/tests/parse.js
index f014900..bc174db 100755
--- a/tests/parse.js
+++ b/tests/parse.js
@@ -73,7 +73,7 @@
'oldtext': {
description: 'The old page text for a selective-serialization
(see --selser)',
'boolean': false,
- 'default': false,
+ 'default': null,
},
'oldtextfile': {
description: 'File containing the old page text for a
selective-serialization (see --selser)',
@@ -231,6 +231,10 @@
env.setPageSrcInfo(argv.oldtext || null);
}
+ if (argv.selser && argv.oldtext === null) {
+ throw new Error('You probably meant to supply the
source to selser.');
+ }
+
if (typeof (input) === 'string') {
return { env: env, input: input };
}
--
To view, visit https://gerrit.wikimedia.org/r/235349
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I356649bff7e62997298c8cb454c13a2fa698d8cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits