Repository navigation
Commit 28bacb1
committed
fix: look up quoted names with brackets, semicolons or quotes as written
Quoted names containing a bracket, a semicolon, a caret, an apostrophe
(inside double quotes), a leading double quote or at sign, or a hash
followed by a digit were not looked up as written. toPathArray splits
the expression at those characters before the name is read, so
$['cd[DataLayer]'], $["it's"], $['x;y'] and $['@id'] found nothing or
threw, and the result paths for such properties could not be fed back
into a query.
A single quoted name with one of those characters is now kept intact in
toPathArray, with a leading backtick (the existing escape) so that it is
looked up as it is. Other names take the same route as before.
Fixes #167, fixes #203, fixes #225 and fixes #258. Also covers the quoted
forms in #173.1 parent 970bdb2 commit 28bacb1
2 files changed
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1254 | 1270 | | |
1255 | 1271 | | |
1256 | 1272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
94 | 143 | | |
95 | 144 | | |
96 | 145 | | |
| |||
0 commit comments