@iebh/polyglot 4.7.6 → 4.7.7

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.
@@ -521,6 +521,19 @@ var parse = function parse(query, options) {
521
521
  q = q.substr(match[1].length);
522
522
  }
523
523
  cropString = false;
524
+ } else if (_lodash["default"].isObject(leaf) && leaf.type == 'mesh' && (match = new RegExp("^(".concat(fieldCodes, ") *(\\[mp=[^\\]\\n]*\\])?"), "i").exec(q))) {
525
+ // Field specifier - PubMed syntax
526
+ // Figure out the leaf to use (usually the last one) or the previously used group
527
+ var useLeaf = leaf;
528
+ useLeaf.field = _fieldCodesParse["default"][match[1].toLowerCase()];
529
+ if (match[2]) {
530
+ offset += match[0].length;
531
+ q = q.substr(match[0].length);
532
+ } else {
533
+ offset += match[1].length;
534
+ q = q.substr(match[1].length);
535
+ }
536
+ cropString = false;
524
537
  }
525
538
  // }}}
526
539
  /// Comment {{{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iebh/polyglot",
3
- "version": "4.7.6",
3
+ "version": "4.7.7",
4
4
  "description": "IEBH-SRA tool to convert between different medical database search formats",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {