Update Remove ANSI Escape Code regex to capture binary escapes

This commit is contained in:
Louis-Ladd 2026-06-01 23:19:51 -06:00
parent aae935d3ea
commit e3a142fda2

View File

@ -32,7 +32,7 @@ class RemoveANSIEscapeCodes extends Operation {
* @returns {string} * @returns {string}
*/ */
run(input, args) { run(input, args) {
const ansiRegex = /(?:\x1B|\\x1b|\\033|\\u001b|\\e)\[[0-?]*[ -/]*[@-~]/g; const ansiRegex = /\x1B|[[0-?]*[ -/]*[@-~]/g;
return input.replace(ansiRegex, ""); return input.replace(ansiRegex, "");
} }