Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 20, 2017
1 parent 69bebf6 commit d9d806e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fixtures/ansi-codes.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,5 @@ exports.urxvt = new Map([
['[3;5;606t', ['URxvt.keysym.C-M-y']],
['[3;1605;5t', ['URxvt.keysym.C-M-e']],
['[3;1605;606t', ['URxvt.keysym.C-M-c']],
[']710;9x15bold\x07', ['URxvt.keysym.font']]
[']710;9x15bold\u0007', ['URxvt.keysym.font']]
]);
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

module.exports = () => {
const pattern = [
'[\\u001b\\u009b][[\\]()#;?]*(?:(?:(?:[a-zA-Z0-9]*(?:;[a-zA-Z0-9]*)*)?\\x07)',
'(?:(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-ntqry=><~]))'
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
].join('|');

return new RegExp(pattern, 'g');
Expand Down

0 comments on commit d9d806e

Please sign in to comment.