Skip to content

Commit 4d6967c

Browse files
committed
added a missing closed parenthesis in the 'cache' module, added parenthesis around regexp to make 'jslint' happy
1 parent 1ae7b3c commit 4d6967c

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/modules/nwmatcher-cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
typeof exports == 'object' ? exports :
2323
// create or extend NW namespace
2424
((global.NW || (global.NW = { })) &&
25-
(global.NW.Dom || (global.NW.Dom = { })),
25+
(global.NW.Dom || (global.NW.Dom = { }))),
2626

2727
Contexts = { },
2828
Results = { },

src/nwmatcher-base.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@
205205
return str.replace(reEscapedChars,
206206
function(substring, p1, p2) {
207207
return p2 ? '\\' + p2 :
208-
/^[0-9a-fA-F]/.test(p1) ? codePointToUTF16(parseInt(p1, 16)) :
209-
/^[\\\x22\x27]/.test(p1) ? substring :
208+
(/^[0-9a-fA-F]/).test(p1) ? codePointToUTF16(parseInt(p1, 16)) :
209+
(/^[\\\x22\x27]/).test(p1) ? substring :
210210
p1;
211211
}
212212
);
@@ -217,8 +217,8 @@
217217
return str.replace(reEscapedChars,
218218
function(substring, p1, p2) {
219219
return p2 ? p2 :
220-
/^[0-9a-fA-F]/.test(p1) ? stringFromCodePoint(parseInt(p1, 16)) :
221-
/^[\\\x22\x27]/.test(p1) ? substring :
220+
(/^[0-9a-fA-F]/).test(p1) ? stringFromCodePoint(parseInt(p1, 16)) :
221+
(/^[\\\x22\x27]/).test(p1) ? substring :
222222
p1;
223223
}
224224
);

src/nwmatcher-noqsa.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@
208208
return str.replace(reEscapedChars,
209209
function(substring, p1, p2) {
210210
return p2 ? '\\' + p2 :
211-
/^[0-9a-fA-F]/.test(p1) ? codePointToUTF16(parseInt(p1, 16)) :
212-
/^[\\\x22\x27]/.test(p1) ? substring :
211+
(/^[0-9a-fA-F]/).test(p1) ? codePointToUTF16(parseInt(p1, 16)) :
212+
(/^[\\\x22\x27]/).test(p1) ? substring :
213213
p1;
214214
}
215215
);
@@ -220,8 +220,8 @@
220220
return str.replace(reEscapedChars,
221221
function(substring, p1, p2) {
222222
return p2 ? p2 :
223-
/^[0-9a-fA-F]/.test(p1) ? stringFromCodePoint(parseInt(p1, 16)) :
224-
/^[\\\x22\x27]/.test(p1) ? substring :
223+
(/^[0-9a-fA-F]/).test(p1) ? stringFromCodePoint(parseInt(p1, 16)) :
224+
(/^[\\\x22\x27]/).test(p1) ? substring :
225225
p1;
226226
}
227227
);

src/nwmatcher.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@
536536
// unescaped " or '
537537
return p2 ? '\\' + p2 :
538538
// javascript strings are UTF-16 encoded
539-
/^[0-9a-fA-F]/.test(p1) ? codePointToUTF16(parseInt(p1, 16)) :
539+
(/^[0-9a-fA-F]/).test(p1) ? codePointToUTF16(parseInt(p1, 16)) :
540540
// \' \"
541-
/^[\\\x22\x27]/.test(p1) ? substring :
541+
(/^[\\\x22\x27]/).test(p1) ? substring :
542542
// \g \h \. \# etc
543543
p1;
544544
}
@@ -554,9 +554,9 @@
554554
// unescaped " or '
555555
return p2 ? p2 :
556556
// javascript strings are UTF-16 encoded
557-
/^[0-9a-fA-F]/.test(p1) ? stringFromCodePoint(parseInt(p1, 16)) :
557+
(/^[0-9a-fA-F]/).test(p1) ? stringFromCodePoint(parseInt(p1, 16)) :
558558
// \' \"
559-
/^[\\\x22\x27]/.test(p1) ? substring :
559+
(/^[\\\x22\x27]/).test(p1) ? substring :
560560
// \g \h \. \# etc
561561
p1;
562562
}

0 commit comments

Comments
 (0)