ibs-format 1.4.12 → 1.4.13

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  function ibsFormat(value, arr, linky, escaping) {
2
- originalArr = JSON.parse(JSON.stringify(arr));
2
+ const originalArr = JSON.parse(JSON.stringify(arr));
3
3
  let output = null;
4
4
  escaping = escaping && escaping.allowXssEscaping == false ? false : true;
5
5
  if (value) {
@@ -47,11 +47,11 @@ function ibsFormat(value, arr, linky, escaping) {
47
47
  if (output) {
48
48
  output = output.replace(/ <br> /g, "<br>");
49
49
  }
50
- output = transformContentInsideEm(output);
50
+ output = transformContentInsideEm(output, originalArr);
51
51
  return output ? output.trim() : "";
52
52
  }
53
53
 
54
- function transformContentInsideEm(inputString) {
54
+ function transformContentInsideEm(inputString, originalArr) {
55
55
  // Define the tag-to-replacement mapping as an array with 3 elements: [tag, symbol, priority]
56
56
 
57
57
  // Match the <em> tag and its content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ibs-format",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "description": "Detect the user-defined identifiers in the text and convert them into HTML tags like bold, italic, strike, and many more having XSS (Cross-site scripting) security with escaping functionality, also detect the links like URLs, email, and IP addresses and wrap them into Anchor tag `<a>`.",
5
5
  "main": "index.js",
6
6
  "scripts": {