@iebh/polyglot 4.9.3 → 4.9.4

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.
@@ -179,6 +179,17 @@ 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 = /(\$1)\b/i.exec(q)) {
183
+ // $1
184
+ branch.nodes.push({
185
+ type: 'dollarOne',
186
+ ref: [match[0]],
187
+ cond: match[0] ? match[0].toUpperCase() : '',
188
+ nodes: []
189
+ });
190
+ offset += match.index + match[0].length;
191
+ q = q.substr(match.index + match[0].length);
192
+ cropString = false;
182
193
  } else if (/^\(/.test(q)) {
183
194
  var newGroup = {
184
195
  type: 'group',
@@ -575,20 +586,6 @@ var parse = function parse(query, options) {
575
586
  offset += match[0].length;
576
587
  q = q.substr(match[0].length);
577
588
  cropString = false;
578
- } else if (match = /(\$1)\b/i.exec(q)) {
579
- // $1
580
- branch.nodes.push({
581
- type: 'dollarOne',
582
- ref: [match[2]],
583
- cond: match[2] ? match[2].toUpperCase() : '',
584
- nodes: []
585
- });
586
- var index = q.indexOf(match[0]);
587
- if (index !== -1) {
588
- offset += index + 2;
589
- q = q.slice(0, index) + q.slice(index + 2);
590
- cropString = false;
591
- }
592
589
  }
593
590
  // }}}
594
591
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iebh/polyglot",
3
- "version": "4.9.3",
3
+ "version": "4.9.4",
4
4
  "description": "IEBH-SRA tool to convert between different medical database search formats",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {