catchup-library-web 1.18.10 → 1.18.11
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
|
@@ -3396,22 +3396,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3396
3396
|
inputPartIndex
|
|
3397
3397
|
);
|
|
3398
3398
|
};
|
|
3399
|
-
const balanceSpecialChars = (text) => {
|
|
3400
|
-
let result = text;
|
|
3401
|
-
if ((result.split("__").length - 1) % 2 === 1) {
|
|
3402
|
-
result = result + "__";
|
|
3403
|
-
}
|
|
3404
|
-
if ((result.split("**").length - 1) % 2 === 1) {
|
|
3405
|
-
result = result + "**";
|
|
3406
|
-
}
|
|
3407
|
-
if ((result.split("$$").length - 1) % 2 === 1) {
|
|
3408
|
-
result = result + "$$";
|
|
3409
|
-
}
|
|
3410
|
-
return result;
|
|
3411
|
-
};
|
|
3412
3399
|
const renderTextContent = (text, itemKey) => {
|
|
3413
|
-
|
|
3414
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(text).map(
|
|
3415
3401
|
(inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
|
|
3416
3402
|
) }, itemKey);
|
|
3417
3403
|
};
|
|
@@ -3428,13 +3414,14 @@ var ShowBodyMediaByContentType = ({
|
|
|
3428
3414
|
while (copyValue.includes(checkText)) {
|
|
3429
3415
|
const firstIndex = copyValue.indexOf(checkText);
|
|
3430
3416
|
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3417
|
+
console.log("text before: ", textBeforeTag);
|
|
3431
3418
|
if (textBeforeTag.trim() !== "") {
|
|
3432
|
-
const balancedText = balanceSpecialChars(textBeforeTag);
|
|
3433
3419
|
currentIndex++;
|
|
3434
3420
|
const itemKey2 = `text-before-${index}-${currentIndex}`;
|
|
3435
|
-
valuePartList.push(renderTextContent(
|
|
3421
|
+
valuePartList.push(renderTextContent(textBeforeTag, itemKey2));
|
|
3436
3422
|
}
|
|
3437
3423
|
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3424
|
+
console.log("sub value: ", subValue);
|
|
3438
3425
|
const secondIndex = subValue.indexOf(checkText);
|
|
3439
3426
|
if (secondIndex === -1) break;
|
|
3440
3427
|
const textInsideTag = copyValue.substring(
|
|
@@ -3444,9 +3431,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3444
3431
|
currentIndex++;
|
|
3445
3432
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3446
3433
|
console.log("text inside: ", textInsideTag);
|
|
3447
|
-
const balancedTextInsideTag = balanceSpecialChars(textInsideTag);
|
|
3448
3434
|
valuePartList.push(
|
|
3449
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(
|
|
3435
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3450
3436
|
(inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
|
|
3451
3437
|
) }, itemKey)
|
|
3452
3438
|
);
|
|
@@ -3612,7 +3598,6 @@ var ShowBodyMediaByContentType = ({
|
|
|
3612
3598
|
processAudioTags();
|
|
3613
3599
|
if (copyValue.trim() !== "") {
|
|
3614
3600
|
currentIndex++;
|
|
3615
|
-
copyValue = balanceSpecialChars(copyValue);
|
|
3616
3601
|
const regexMatchImageText = copyValue.match(/<image>([\s\S]*?)<\/image>/);
|
|
3617
3602
|
if (regexMatchImageText) {
|
|
3618
3603
|
const imageText = regexMatchImageText[1];
|
package/dist/index.mjs
CHANGED
|
@@ -3180,22 +3180,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3180
3180
|
inputPartIndex
|
|
3181
3181
|
);
|
|
3182
3182
|
};
|
|
3183
|
-
const balanceSpecialChars = (text) => {
|
|
3184
|
-
let result = text;
|
|
3185
|
-
if ((result.split("__").length - 1) % 2 === 1) {
|
|
3186
|
-
result = result + "__";
|
|
3187
|
-
}
|
|
3188
|
-
if ((result.split("**").length - 1) % 2 === 1) {
|
|
3189
|
-
result = result + "**";
|
|
3190
|
-
}
|
|
3191
|
-
if ((result.split("$$").length - 1) % 2 === 1) {
|
|
3192
|
-
result = result + "$$";
|
|
3193
|
-
}
|
|
3194
|
-
return result;
|
|
3195
|
-
};
|
|
3196
3183
|
const renderTextContent = (text, itemKey) => {
|
|
3197
|
-
|
|
3198
|
-
return /* @__PURE__ */ jsx18("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3184
|
+
return /* @__PURE__ */ jsx18("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(text).map(
|
|
3199
3185
|
(inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
|
|
3200
3186
|
) }, itemKey);
|
|
3201
3187
|
};
|
|
@@ -3212,13 +3198,14 @@ var ShowBodyMediaByContentType = ({
|
|
|
3212
3198
|
while (copyValue.includes(checkText)) {
|
|
3213
3199
|
const firstIndex = copyValue.indexOf(checkText);
|
|
3214
3200
|
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3201
|
+
console.log("text before: ", textBeforeTag);
|
|
3215
3202
|
if (textBeforeTag.trim() !== "") {
|
|
3216
|
-
const balancedText = balanceSpecialChars(textBeforeTag);
|
|
3217
3203
|
currentIndex++;
|
|
3218
3204
|
const itemKey2 = `text-before-${index}-${currentIndex}`;
|
|
3219
|
-
valuePartList.push(renderTextContent(
|
|
3205
|
+
valuePartList.push(renderTextContent(textBeforeTag, itemKey2));
|
|
3220
3206
|
}
|
|
3221
3207
|
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3208
|
+
console.log("sub value: ", subValue);
|
|
3222
3209
|
const secondIndex = subValue.indexOf(checkText);
|
|
3223
3210
|
if (secondIndex === -1) break;
|
|
3224
3211
|
const textInsideTag = copyValue.substring(
|
|
@@ -3228,9 +3215,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3228
3215
|
currentIndex++;
|
|
3229
3216
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3230
3217
|
console.log("text inside: ", textInsideTag);
|
|
3231
|
-
const balancedTextInsideTag = balanceSpecialChars(textInsideTag);
|
|
3232
3218
|
valuePartList.push(
|
|
3233
|
-
/* @__PURE__ */ jsx18("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(
|
|
3219
|
+
/* @__PURE__ */ jsx18("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3234
3220
|
(inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
|
|
3235
3221
|
) }, itemKey)
|
|
3236
3222
|
);
|
|
@@ -3396,7 +3382,6 @@ var ShowBodyMediaByContentType = ({
|
|
|
3396
3382
|
processAudioTags();
|
|
3397
3383
|
if (copyValue.trim() !== "") {
|
|
3398
3384
|
currentIndex++;
|
|
3399
|
-
copyValue = balanceSpecialChars(copyValue);
|
|
3400
3385
|
const regexMatchImageText = copyValue.match(/<image>([\s\S]*?)<\/image>/);
|
|
3401
3386
|
if (regexMatchImageText) {
|
|
3402
3387
|
const imageText = regexMatchImageText[1];
|
package/package.json
CHANGED
|
@@ -54,30 +54,10 @@ const ShowBodyMediaByContentType = ({
|
|
|
54
54
|
);
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
const balanceSpecialChars = (text: string) => {
|
|
58
|
-
let result = text;
|
|
59
|
-
|
|
60
|
-
if ((result.split("__").length - 1) % 2 === 1) {
|
|
61
|
-
result = result + "__";
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if ((result.split("**").length - 1) % 2 === 1) {
|
|
65
|
-
result = result + "**";
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if ((result.split("$$").length - 1) % 2 === 1) {
|
|
69
|
-
result = result + "$$";
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return result;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
57
|
const renderTextContent = (text: string, itemKey: string) => {
|
|
76
|
-
const balancedText = balanceSpecialChars(text);
|
|
77
|
-
|
|
78
58
|
return (
|
|
79
59
|
<span key={itemKey} className="text-xl">
|
|
80
|
-
{constructInputWithSpecialExpressionList(
|
|
60
|
+
{constructInputWithSpecialExpressionList(text).map(
|
|
81
61
|
(inputPart: IInputPart, inputPartIndex: number) =>
|
|
82
62
|
renderSpecialExpressions(inputPart, inputPartIndex)
|
|
83
63
|
)}
|
|
@@ -102,15 +82,16 @@ const ShowBodyMediaByContentType = ({
|
|
|
102
82
|
while (copyValue.includes(checkText)) {
|
|
103
83
|
const firstIndex = copyValue.indexOf(checkText);
|
|
104
84
|
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
85
|
+
console.log("text before: ", textBeforeTag);
|
|
105
86
|
|
|
106
87
|
if (textBeforeTag.trim() !== "") {
|
|
107
|
-
const balancedText = balanceSpecialChars(textBeforeTag);
|
|
108
88
|
currentIndex++;
|
|
109
89
|
const itemKey = `text-before-${index}-${currentIndex}`;
|
|
110
|
-
valuePartList.push(renderTextContent(
|
|
90
|
+
valuePartList.push(renderTextContent(textBeforeTag, itemKey));
|
|
111
91
|
}
|
|
112
92
|
|
|
113
93
|
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
94
|
+
console.log("sub value: ", subValue);
|
|
114
95
|
const secondIndex = subValue.indexOf(checkText);
|
|
115
96
|
if (secondIndex === -1) break;
|
|
116
97
|
|
|
@@ -123,10 +104,9 @@ const ShowBodyMediaByContentType = ({
|
|
|
123
104
|
|
|
124
105
|
console.log("text inside: ", textInsideTag);
|
|
125
106
|
|
|
126
|
-
const balancedTextInsideTag = balanceSpecialChars(textInsideTag);
|
|
127
107
|
valuePartList.push(
|
|
128
108
|
<span key={itemKey} className="text-xl font-bold">
|
|
129
|
-
{constructInputWithSpecialExpressionList(
|
|
109
|
+
{constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
130
110
|
(inputPart: IInputPart, inputPartIndex: number) =>
|
|
131
111
|
renderSpecialExpressions(inputPart, inputPartIndex)
|
|
132
112
|
)}
|
|
@@ -291,7 +271,6 @@ const ShowBodyMediaByContentType = ({
|
|
|
291
271
|
|
|
292
272
|
if (copyValue.trim() !== "") {
|
|
293
273
|
currentIndex++;
|
|
294
|
-
copyValue = balanceSpecialChars(copyValue);
|
|
295
274
|
|
|
296
275
|
const regexMatchImageText = copyValue.match(/<image>([\s\S]*?)<\/image>/);
|
|
297
276
|
if (regexMatchImageText) {
|