@iebh/polyglot 5.0.7 → 5.0.8
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 +2 -2
- package/package.json +1 -1
package/lib/modules/parse.js
CHANGED
|
@@ -394,7 +394,7 @@ var parse = function parse(query, options) {
|
|
|
394
394
|
}
|
|
395
395
|
newLeaf.field = match[4] ? 'MeSH Major Topic search (Not exploded)' : 'MeSH Major Topic search (exploded)';
|
|
396
396
|
// if (/^["“”].*["“”]$/.test(newLeaf.content)) newLeaf.content = newLeaf.content.substr(1, newLeaf.content.length - 2); // Remove wrapping '"' characters
|
|
397
|
-
if (/^["“”'‘’].*["“”'‘’]$/.test(
|
|
397
|
+
if (/^["“”'‘’].*["“”'‘’]$/.test(newLeaf.content)) newLeaf.content = newLeaf.content.substr(1, newLeaf.content.length - 2); // Remove wrapping '"' characters
|
|
398
398
|
// if (/^["“”'‘’].*["“”'‘’]$/.test(leaf.content) && ['"', '“', '”', "'", '‘', '’'].includes(leaf.content[0]) && ['"', '“', '”', "'", '‘', '’'].includes(leaf.content.slice(-1))) leaf.content = leaf.content.slice(1, -1);
|
|
399
399
|
branch.nodes.push(newLeaf);
|
|
400
400
|
offset += match[0].length;
|
|
@@ -410,7 +410,7 @@ var parse = function parse(query, options) {
|
|
|
410
410
|
}
|
|
411
411
|
newLeaf.field = match[4] ? 'MeSH Major Topic search (Not exploded)' : 'MeSH Major Topic search (exploded)';
|
|
412
412
|
// if (/^["“”].*["“”]$/.test(newLeaf.content)) newLeaf.content = newLeaf.content.substr(1, newLeaf.content.length - 2); // Remove wrapping '"' characters
|
|
413
|
-
if (/^["“”'‘’].*["“”'‘’]$/.test(
|
|
413
|
+
if (/^["“”'‘’].*["“”'‘’]$/.test(newLeaf.content)) newLeaf.content = newLeaf.content.substr(1, newLeaf.content.length - 2); // Remove wrapping '"' characters
|
|
414
414
|
// if (/^["“”'‘’].*["“”'‘’]$/.test(leaf.content) && ['"', '“', '”', "'", '‘', '’'].includes(leaf.content[0]) && ['"', '“', '”', "'", '‘', '’'].includes(leaf.content.slice(-1))) leaf.content = leaf.content.slice(1, -1);
|
|
415
415
|
branch.nodes.push(newLeaf);
|
|
416
416
|
offset += match[0].length;
|