@iebh/polyglot 4.8.9 → 4.9.1

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.
@@ -333,7 +333,7 @@ var _default = {
333
333
  buffer += '*';
334
334
  break;
335
335
  case 'Ovid MEDLINE':
336
- buffer += branch.content;
336
+ buffer += '$1';
337
337
  break;
338
338
  case 'Cochrane Library':
339
339
  case 'PsycInfo (Ovid)':
@@ -179,8 +179,8 @@ 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)(?:\s+(AND|OR|NOT))?/i.exec(q)) {
183
- // $1/ $1 AND
182
+ } else if (match = /(\$1)\b/i.exec(q)) {
183
+ // $1
184
184
  branch.nodes.push({
185
185
  type: 'dollarOne',
186
186
  ref: [match[2]],
@@ -190,17 +190,6 @@ var parse = function parse(query, options) {
190
190
  offset += match[0].length;
191
191
  q = q.substr(match[0].length);
192
192
  cropString = false;
193
- } else if (match = /^(AND|OR|NOT)\s+(\$1)/i.exec(q)) {
194
- // AND 1$
195
- branch.nodes.push({
196
- type: 'dollarOne',
197
- ref: [match[2]],
198
- cond: match[1].toUpperCase(),
199
- nodes: []
200
- });
201
- offset += match[0].length;
202
- q = q.substr(match[0].length);
203
- cropString = false;
204
193
  } else if (/^\(/.test(q)) {
205
194
  var newGroup = {
206
195
  type: 'group',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iebh/polyglot",
3
- "version": "4.8.9",
3
+ "version": "4.9.1",
4
4
  "description": "IEBH-SRA tool to convert between different medical database search formats",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {