Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/131598
Change subject: Some complaints from jshint
......................................................................
Some complaints from jshint
* Noted by cscott
Change-Id: I3e7a96ba2367e57549acbf82bd508a73b6f514ea
---
M .jshintrc
M lib/pegTokenizer.pegjs.txt
2 files changed, 8 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/98/131598/1
diff --git a/.jshintrc b/.jshintrc
index e1ed177..aa08393 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,10 +1,10 @@
{
"predef": [
"ve",
-
"setImmediate",
-
- "QUnit"
+ "QUnit",
+ "Map",
+ "Set"
],
"bitwise": true,
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index d9bb805..3fee1d7 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -75,7 +75,7 @@
if ( res ) {
e = res;
- }
+ }
return e;
}
@@ -258,9 +258,6 @@
"dl", "dt", "dd", "div", "center", "blockquote"
]);
-
- var self = this;
-
function buildXMLTag(name, lcName, attribs, endTag, selfClose, tsr) {
var tok, da = { tsr: tsr, stx: 'html' };
@@ -268,9 +265,9 @@
da.srcTagName = name;
}
- if ( endTag != null ) {
+ if ( endTag !== null ) {
tok = new EndTagTk( lcName, attribs, da );
- } else if ( selfClose != null ) {
+ } else if ( selfClose !== null ) {
da.selfClose = true;
tok = new SelfclosingTagTk( lcName, attribs, da );
} else {
@@ -445,12 +442,12 @@
bs.dataAttribs = {};
}
tokens = b;
- } else if (bs && b.constructor === String) {
+ } else if (b && b.constructor === String) {
tokens = [b];
}
// Emit tokens for this toplevelblock. This feeds a chunk to the parser
pipeline.
- if ( tokens) {
+ if ( tokens ) {
emitChunk( tokens );
}
--
To view, visit https://gerrit.wikimedia.org/r/131598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e7a96ba2367e57549acbf82bd508a73b6f514ea
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