diff --git a/lib/util.js b/lib/util.js index 90f9b7e..eca8e25 100644 --- a/lib/util.js +++ b/lib/util.js @@ -30,7 +30,7 @@ function partition(event) { // regex from https://github.com/chalk/ansi-regex const ANSI_REGEX = (() => { const pattern = [ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)", + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))", ].join("|");