diff --git a/index.js b/index.js index c254480..9e37ec3 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ module.exports = options => { }, options); 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-PR-TZcf-ntqry=><~]))' ].join('|'); diff --git a/package.json b/package.json index a849fdf..66a43e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ansi-regex", - "version": "4.1.0", + "version": "4.1.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": "chalk/ansi-regex",