@fileverse-dev/fortune-core 1.2.39 → 1.2.41

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.
@@ -308,7 +308,9 @@ export function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
308
308
  });
309
309
  similarIndex += 1;
310
310
  } else {
311
- var newValueArray = newValue.split("");
311
+ var newValueArray = Array.from(new Intl.Segmenter().segment(newValue), function (s) {
312
+ return s.segment;
313
+ });
312
314
  for (var n = 0; n < newValueArray.length; n += 1) {
313
315
  var nv = newValueArray[n];
314
316
  inlineStringArr.push({
@@ -322,7 +322,9 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
322
322
  });
323
323
  similarIndex += 1;
324
324
  } else {
325
- var newValueArray = newValue.split("");
325
+ var newValueArray = Array.from(new Intl.Segmenter().segment(newValue), function (s) {
326
+ return s.segment;
327
+ });
326
328
  for (var n = 0; n < newValueArray.length; n += 1) {
327
329
  var nv = newValueArray[n];
328
330
  inlineStringArr.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.2.39",
3
+ "version": "1.2.41",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",