codemaxxing 1.0.10 → 1.0.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 +8 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1828,15 +1828,14 @@ process.stdin.emit = function (event, ...args) {
|
|
|
1828
1828
|
// Strip full and partial bracketed paste markers — catch every possible fragment
|
|
1829
1829
|
// Full: \x1b[200~ / \x1b[201~ Partial: [200~ / [201~ Bare: 200~ / 201~
|
|
1830
1830
|
data = data.replace(/\x1b?\[?20[01]~/g, "");
|
|
1831
|
-
// Belt-and-suspenders:
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
if (data.includes("[200
|
|
1837
|
-
data = data.
|
|
1838
|
-
|
|
1839
|
-
data = data.split("[201~").join("");
|
|
1831
|
+
// Belt-and-suspenders: catch any residual marker fragments with multiple passes
|
|
1832
|
+
data = data.replace(/\[20[01]~/g, ""); // [200~ or [201~
|
|
1833
|
+
data = data.replace(/20[01]~/g, ""); // 200~ or 201~
|
|
1834
|
+
data = data.replace(/\[\d01~/g, ""); // any [Xdigit01~
|
|
1835
|
+
// Final paranoia pass: remove anything that looks like a closing bracket-tilde
|
|
1836
|
+
if (data.includes("[201") || data.includes("[200")) {
|
|
1837
|
+
data = data.replace(/\[[0-9]*0?[01]~?/g, "");
|
|
1838
|
+
}
|
|
1840
1839
|
// ── Bracketed paste handling ──
|
|
1841
1840
|
if (hadStart) {
|
|
1842
1841
|
// Flush any pending burst before entering bracketed mode
|