Merge pull request #615 from Corbe30/optimize/filltext-newline-parsing

fixed #578: performance improvement on filltext()
This commit is contained in:
Sanchit Agarwal 2024-11-03 07:41:56 +05:30 committed by GitHub
commit 01d52cec91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -473,20 +473,15 @@ export function getCellTextInfo(
});
similarIndex += 1;
} else {
const newValueArray = newValue.split("");
for (let n = 0; n < newValueArray.length; n += 1) {
const nv = newValueArray[n];
inlineStringArr.push({
fontset: scfontset,
fc: !fc ? "#000" : fc,
cl: !cl ? 0 : cl,
un: !un ? 0 : un,
v: nv,
si: similarIndex,
fs: !fs ? 11 : fs,
});
}
inlineStringArr.push({
fontset: scfontset,
fc: !fc ? "#000" : fc,
cl: !cl ? 0 : cl,
un: !un ? 0 : un,
v: newValue,
si: similarIndex,
fs: !fs ? 11 : fs,
});
if (x !== splitArr.length - 1) {
inlineStringArr.push({