Add \e escape codes to remove ANSI escape codes operation
This commit is contained in:
parent
53adbca9be
commit
fe13f6401d
@ -32,7 +32,7 @@ class RemoveANSIEscapeCodes extends Operation {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
run(input, args) {
|
run(input, args) {
|
||||||
const ansiRegex = /(?:\x1B|\\x1b|\\033|\\u001b)\[[0-?]*[ -/]*[@-~]/g;
|
const ansiRegex = /(?:\x1B|\\x1b|\\033|\\u001b|\\e)\[[0-?]*[ -/]*[@-~]/g;
|
||||||
return input.replace(ansiRegex, "");
|
return input.replace(ansiRegex, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user