poe-code 11.0.21 → 11.0.22
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 +4 -3
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-KWRLKWB3.js → chunk-IB5DSFBQ.js} +4 -3
- package/packages/safejs/dist/chunks/{chunk-KWRLKWB3.js.map → chunk-IB5DSFBQ.js.map} +2 -2
- package/packages/safejs/dist/chunks/{chunk-JLAZPLMH.js → chunk-K3DCXHEE.js} +2 -2
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/interp/methods/string.js +3 -2
- /package/packages/safejs/dist/chunks/{chunk-JLAZPLMH.js.map → chunk-K3DCXHEE.js.map} +0 -0
package/package.json
CHANGED
|
@@ -25362,7 +25362,8 @@ function callSplit(value, args, budget) {
|
|
|
25362
25362
|
let endedWithZeroWidthMatch = false;
|
|
25363
25363
|
for (const match of collectRegexMatches(splitter, value, true)) {
|
|
25364
25364
|
endedWithZeroWidthMatch = match.text.length === 0 && match.index === value.length;
|
|
25365
|
-
if (match.text.length === 0 && match.index ===
|
|
25365
|
+
if (match.text.length === 0 && (match.index === copiedThrough || match.index === value.length))
|
|
25366
|
+
continue;
|
|
25366
25367
|
if (result2.length >= limit2) break;
|
|
25367
25368
|
result2.push(budget.allocateString(value.slice(copiedThrough, match.index)));
|
|
25368
25369
|
for (const capture of match.captures) {
|
|
@@ -25371,7 +25372,7 @@ function callSplit(value, args, budget) {
|
|
|
25371
25372
|
}
|
|
25372
25373
|
copiedThrough = match.index + match.text.length;
|
|
25373
25374
|
}
|
|
25374
|
-
if (result2.length < limit2 && !endedWithZeroWidthMatch)
|
|
25375
|
+
if (result2.length < limit2 && (value.length > 0 || !endedWithZeroWidthMatch))
|
|
25375
25376
|
result2.push(budget.allocateString(value.slice(copiedThrough)));
|
|
25376
25377
|
budget.allocateArrayLength(result2.length);
|
|
25377
25378
|
return result2;
|
|
@@ -29124,4 +29125,4 @@ export {
|
|
|
29124
29125
|
FileSnapshotBackend,
|
|
29125
29126
|
run
|
|
29126
29127
|
};
|
|
29127
|
-
//# sourceMappingURL=chunk-
|
|
29128
|
+
//# sourceMappingURL=chunk-IB5DSFBQ.js.map
|