Skip to content

Commit 1a2a255

Browse files
committed
Pass final 3 tests
Now passing all tests from jmespath.test.
1 parent f0134a0 commit 1a2a255

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

jmespath.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@
301301
this.current = current;
302302
}
303303
this.current++;
304-
return stream.slice(start + 1, this.current - 1);
304+
var literal = stream.slice(start + 1, this.current - 1);
305+
return literal.replace("\\'", "'");
305306
},
306307

307308
consumeNumber: function(stream) {
@@ -439,7 +440,7 @@
439440
"NE": 5,
440441
"Flatten": 9,
441442
"Star": 20,
442-
"Filter": 20,
443+
"Filter": 21,
443444
"Dot": 40,
444445
"Not": 45,
445446
"Lbrace": 50,
@@ -1028,7 +1029,7 @@
10281029
var matched, current;
10291030
for (var i = 0; i < base.length; i++) {
10301031
matched = this.visit(node.children[2], base[i]);
1031-
if (matched === true) {
1032+
if (!isFalse(matched)) {
10321033
filtered.push(base[i]);
10331034
}
10341035
}

0 commit comments

Comments
 (0)