@iebh/polyglot 5.0.6 → 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/lib/modules/tools.js +4 -1
- 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;
|
package/lib/modules/tools.js
CHANGED
|
@@ -211,7 +211,10 @@ var tools = {
|
|
|
211
211
|
text = tools.wildCardCochrane(text, settings.highlighting);
|
|
212
212
|
}
|
|
213
213
|
replaceObj = {
|
|
214
|
-
'$': settings.highlighting
|
|
214
|
+
// '$': settings.highlighting
|
|
215
|
+
// ? tools.createTooltip("?", "As Cochrane does not support single character truncation, the 0 or 1 character truncation is used here.", "highlight")
|
|
216
|
+
// : '*',
|
|
217
|
+
'$': '*',
|
|
215
218
|
'#': '?'
|
|
216
219
|
};
|
|
217
220
|
return tools.multiReplace(text, replaceObj);
|