catchup-library-web 1.9.2 → 1.9.4

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
@@ -1193,12 +1193,17 @@ var constructInputWithSpecialExpressionList = (inputText) => {
1193
1193
  let isEquation = false;
1194
1194
  const splittedEquation = splittedUnderline[j].split("$$");
1195
1195
  for (let k = 0; k < splittedEquation.length; k++) {
1196
- inputPartList.push({
1197
- value: splittedEquation[k],
1198
- isEquation,
1199
- isUnderline,
1200
- isBold
1201
- });
1196
+ let isBacktickEquation = false;
1197
+ const splittedBacktick = splittedEquation[k].split("`");
1198
+ for (let l = 0; l < splittedBacktick.length; l++) {
1199
+ inputPartList.push({
1200
+ value: splittedBacktick[l],
1201
+ isEquation: isEquation || isBacktickEquation,
1202
+ isUnderline,
1203
+ isBold
1204
+ });
1205
+ isBacktickEquation = !isBacktickEquation;
1206
+ }
1202
1207
  isEquation = !isEquation;
1203
1208
  }
1204
1209
  isUnderline = !isUnderline;
package/dist/index.mjs CHANGED
@@ -994,12 +994,17 @@ var constructInputWithSpecialExpressionList = (inputText) => {
994
994
  let isEquation = false;
995
995
  const splittedEquation = splittedUnderline[j].split("$$");
996
996
  for (let k = 0; k < splittedEquation.length; k++) {
997
- inputPartList.push({
998
- value: splittedEquation[k],
999
- isEquation,
1000
- isUnderline,
1001
- isBold
1002
- });
997
+ let isBacktickEquation = false;
998
+ const splittedBacktick = splittedEquation[k].split("`");
999
+ for (let l = 0; l < splittedBacktick.length; l++) {
1000
+ inputPartList.push({
1001
+ value: splittedBacktick[l],
1002
+ isEquation: isEquation || isBacktickEquation,
1003
+ isUnderline,
1004
+ isBold
1005
+ });
1006
+ isBacktickEquation = !isBacktickEquation;
1007
+ }
1003
1008
  isEquation = !isEquation;
1004
1009
  }
1005
1010
  isUnderline = !isUnderline;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -169,30 +169,68 @@ export const retrieveTaxonomyName = () => {
169
169
  ];
170
170
  };
171
171
 
172
+ // export const constructInputWithSpecialExpressionList = (inputText: string) => {
173
+ // const inputPartList = [];
174
+ // if (!inputText) return [];
175
+ // const splittedBold = inputText.split("**");
176
+ // let isBold = false;
177
+ // for (let i = 0; i < splittedBold.length; i++) {
178
+ // let isUnderline = false;
179
+ // const splittedUnderline = splittedBold[i].split("__");
180
+ // for (let j = 0; j < splittedUnderline.length; j++) {
181
+ // let isEquation = false;
182
+ // const splittedEquation = splittedUnderline[j].split("$$");
183
+ // for (let k = 0; k < splittedEquation.length; k++) {
184
+ // inputPartList.push({
185
+ // value: splittedEquation[k],
186
+ // isEquation,
187
+ // isUnderline,
188
+ // isBold,
189
+ // });
190
+ // isEquation = !isEquation;
191
+ // }
192
+ // isUnderline = !isUnderline;
193
+ // }
194
+ // isBold = !isBold;
195
+ // }
196
+ // return inputPartList;
197
+ // };
198
+
172
199
  export const constructInputWithSpecialExpressionList = (inputText: string) => {
173
200
  const inputPartList = [];
174
201
  if (!inputText) return [];
202
+
175
203
  const splittedBold = inputText.split("**");
176
204
  let isBold = false;
205
+
177
206
  for (let i = 0; i < splittedBold.length; i++) {
178
207
  let isUnderline = false;
179
208
  const splittedUnderline = splittedBold[i].split("__");
209
+
180
210
  for (let j = 0; j < splittedUnderline.length; j++) {
181
211
  let isEquation = false;
182
212
  const splittedEquation = splittedUnderline[j].split("$$");
213
+
183
214
  for (let k = 0; k < splittedEquation.length; k++) {
184
- inputPartList.push({
185
- value: splittedEquation[k],
186
- isEquation,
187
- isUnderline,
188
- isBold,
189
- });
215
+ let isBacktickEquation = false;
216
+ const splittedBacktick = splittedEquation[k].split("`");
217
+
218
+ for (let l = 0; l < splittedBacktick.length; l++) {
219
+ inputPartList.push({
220
+ value: splittedBacktick[l],
221
+ isEquation: isEquation || isBacktickEquation,
222
+ isUnderline,
223
+ isBold,
224
+ });
225
+ isBacktickEquation = !isBacktickEquation;
226
+ }
190
227
  isEquation = !isEquation;
191
228
  }
192
229
  isUnderline = !isUnderline;
193
230
  }
194
231
  isBold = !isBold;
195
232
  }
233
+
196
234
  return inputPartList;
197
235
  };
198
236