@iebh/polyglot 4.9.0 → 4.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules/parse.js +7 -4
- package/package.json +1 -1
package/lib/modules/parse.js
CHANGED
|
@@ -179,7 +179,7 @@ var parse = function parse(query, options) {
|
|
|
179
179
|
});
|
|
180
180
|
offset += match[1].length;
|
|
181
181
|
q = q.substr(match[1].length);
|
|
182
|
-
} else if (match =
|
|
182
|
+
} else if (match = /(\$1)\b/i.exec(q)) {
|
|
183
183
|
// $1
|
|
184
184
|
branch.nodes.push({
|
|
185
185
|
type: 'dollarOne',
|
|
@@ -187,9 +187,12 @@ var parse = function parse(query, options) {
|
|
|
187
187
|
cond: match[2] ? match[2].toUpperCase() : '',
|
|
188
188
|
nodes: []
|
|
189
189
|
});
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
var index = q.indexOf(match[0]);
|
|
191
|
+
if (index !== -1) {
|
|
192
|
+
offset += index + 2;
|
|
193
|
+
q = q.slice(0, index) + q.slice(index + 2);
|
|
194
|
+
cropString = false;
|
|
195
|
+
}
|
|
193
196
|
} else if (/^\(/.test(q)) {
|
|
194
197
|
var newGroup = {
|
|
195
198
|
type: 'group',
|