catchup-library-web 1.18.8 → 1.18.10

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/dist/index.js CHANGED
@@ -3443,17 +3443,16 @@ var ShowBodyMediaByContentType = ({
3443
3443
  );
3444
3444
  currentIndex++;
3445
3445
  const itemKey = `text-inside-${index}-${currentIndex}`;
3446
+ console.log("text inside: ", textInsideTag);
3447
+ const balancedTextInsideTag = balanceSpecialChars(textInsideTag);
3446
3448
  valuePartList.push(
3447
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
3449
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(balancedTextInsideTag).map(
3448
3450
  (inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
3449
3451
  ) }, itemKey)
3450
3452
  );
3451
3453
  copyValue = copyValue.substring(
3452
3454
  firstIndex + checkText.length + secondIndex + checkText.length
3453
3455
  );
3454
- if ((copyValue.split("$$").length - 1) % 2 === 1) {
3455
- copyValue = "$$" + copyValue;
3456
- }
3457
3456
  }
3458
3457
  };
3459
3458
  const processImageTags = () => {
@@ -3777,6 +3776,7 @@ var ActivityBodyContent = ({
3777
3776
  );
3778
3777
  } else {
3779
3778
  const trimmedAnswer = typeof answer === "string" ? answer.trim() : String(answer);
3779
+ console.log("trimmed answer: ", trimmedAnswer);
3780
3780
  switch (contentType) {
3781
3781
  case "TEXT":
3782
3782
  processedValue = processedValue.replace(
package/dist/index.mjs CHANGED
@@ -3227,17 +3227,16 @@ var ShowBodyMediaByContentType = ({
3227
3227
  );
3228
3228
  currentIndex++;
3229
3229
  const itemKey = `text-inside-${index}-${currentIndex}`;
3230
+ console.log("text inside: ", textInsideTag);
3231
+ const balancedTextInsideTag = balanceSpecialChars(textInsideTag);
3230
3232
  valuePartList.push(
3231
- /* @__PURE__ */ jsx18("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
3233
+ /* @__PURE__ */ jsx18("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(balancedTextInsideTag).map(
3232
3234
  (inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
3233
3235
  ) }, itemKey)
3234
3236
  );
3235
3237
  copyValue = copyValue.substring(
3236
3238
  firstIndex + checkText.length + secondIndex + checkText.length
3237
3239
  );
3238
- if ((copyValue.split("$$").length - 1) % 2 === 1) {
3239
- copyValue = "$$" + copyValue;
3240
- }
3241
3240
  }
3242
3241
  };
3243
3242
  const processImageTags = () => {
@@ -3561,6 +3560,7 @@ var ActivityBodyContent = ({
3561
3560
  );
3562
3561
  } else {
3563
3562
  const trimmedAnswer = typeof answer === "string" ? answer.trim() : String(answer);
3563
+ console.log("trimmed answer: ", trimmedAnswer);
3564
3564
  switch (contentType) {
3565
3565
  case "TEXT":
3566
3566
  processedValue = processedValue.replace(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.18.8",
3
+ "version": "1.18.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -37,6 +37,8 @@ const ActivityBodyContent = ({
37
37
  const trimmedAnswer =
38
38
  typeof answer === "string" ? answer.trim() : String(answer);
39
39
 
40
+ console.log("trimmed answer: ", trimmedAnswer);
41
+
40
42
  switch (contentType) {
41
43
  case "TEXT":
42
44
  processedValue = processedValue.replace(
@@ -32,7 +32,6 @@ const ShowBodyMediaByContentType = ({
32
32
  }
33
33
  };
34
34
 
35
- // Helper function to render special expressions with proper keys
36
35
  const renderSpecialExpressions = (
37
36
  inputPart: IInputPart,
38
37
  inputPartIndex: number
@@ -58,17 +57,14 @@ const ShowBodyMediaByContentType = ({
58
57
  const balanceSpecialChars = (text: string) => {
59
58
  let result = text;
60
59
 
61
- // Balance underscores
62
60
  if ((result.split("__").length - 1) % 2 === 1) {
63
61
  result = result + "__";
64
62
  }
65
63
 
66
- // Balance asterisks
67
64
  if ((result.split("**").length - 1) % 2 === 1) {
68
65
  result = result + "**";
69
66
  }
70
67
 
71
- // Balance backticks
72
68
  if ((result.split("$$").length - 1) % 2 === 1) {
73
69
  result = result + "$$";
74
70
  }
@@ -76,7 +72,6 @@ const ShowBodyMediaByContentType = ({
76
72
  return result;
77
73
  };
78
74
 
79
- // Render text content with proper formatting
80
75
  const renderTextContent = (text: string, itemKey: string) => {
81
76
  const balancedText = balanceSpecialChars(text);
82
77
 
@@ -126,9 +121,12 @@ const ShowBodyMediaByContentType = ({
126
121
  currentIndex++;
127
122
  const itemKey = `text-inside-${index}-${currentIndex}`;
128
123
 
124
+ console.log("text inside: ", textInsideTag);
125
+
126
+ const balancedTextInsideTag = balanceSpecialChars(textInsideTag);
129
127
  valuePartList.push(
130
128
  <span key={itemKey} className="text-xl font-bold">
131
- {constructInputWithSpecialExpressionList(textInsideTag).map(
129
+ {constructInputWithSpecialExpressionList(balancedTextInsideTag).map(
132
130
  (inputPart: IInputPart, inputPartIndex: number) =>
133
131
  renderSpecialExpressions(inputPart, inputPartIndex)
134
132
  )}
@@ -138,10 +136,6 @@ const ShowBodyMediaByContentType = ({
138
136
  copyValue = copyValue.substring(
139
137
  firstIndex + checkText.length + secondIndex + checkText.length
140
138
  );
141
-
142
- if ((copyValue.split("$$").length - 1) % 2 === 1) {
143
- copyValue = "$$" + copyValue;
144
- }
145
139
  }
146
140
  };
147
141