@iebh/polyglot 4.4.6 → 4.4.9

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.
@@ -25,6 +25,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
25
25
 
26
26
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
27
 
28
+ // Function to fix cinahl exploded mesh (move + sign back before ")
29
+ function fixCinahl(content) {
30
+ content = content.replace(/"\+/, '+"');
31
+ content = content.replace(/"<\/font><font color="blue">\+/, '+"</font><font color="blue">');
32
+ return content;
33
+ }
34
+
28
35
  var _default = {
29
36
  id: 'generic',
30
37
  title: 'generic',
@@ -72,7 +79,7 @@ var _default = {
72
79
  }).join(""); // Fix to move '+' back one space when quoting
73
80
 
74
81
  if (engine === "CINAHL (Ebsco)") {
75
- content = content.replace(/"\+/, '+"');
82
+ content = fixCinahl(content);
76
83
  }
77
84
 
78
85
  buffer += comment && settings.highlighting ? _tools["default"].createTooltip(content, comment) : content;
@@ -226,8 +233,8 @@ var _default = {
226
233
  }).join(""); // Fix to move '+' back one space when quoting
227
234
 
228
235
 
229
- if (engine === "CINAHL (Ebsco)") {
230
- content = content.replace(/"\+/, '+"');
236
+ if (engine == "CINAHL (Ebsco)") {
237
+ content = fixCinahl(content);
231
238
  }
232
239
 
233
240
  buffer += _comment3 && settings.highlighting ? _tools["default"].createTooltip(content, _comment3) : content;
@@ -297,7 +297,7 @@ var tools = {
297
297
  text = tools.multiReplace(text, replaceObj);
298
298
  }
299
299
 
300
- return space ? settings.highlighting ? '<font color="DarkBlue">"' + text + '"</font>' : '"' + text + '"' : text;
300
+ return engine == 'Embase (Elsevier)' ? space ? settings.highlighting ? "<font color='DarkBlue'>'" + text + "'</font>" : "'" + text + "'" : text : space ? settings.highlighting ? '<font color="DarkBlue">"' + text + '"</font>' : '"' + text + '"' : text;
301
301
  },
302
302
 
303
303
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iebh/polyglot",
3
- "version": "4.4.6",
3
+ "version": "4.4.9",
4
4
  "description": "IEBH-SRA tool to convert between different medical database search formats",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {