Skip to content

Commit 6b0d4e9

Browse files
committed
Fix slow regexp in removeCapturingGroups
1 parent 1f8333b commit 6b0d4e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ace/tokenizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ var Tokenizer = function(rules) {
176176

177177
this.removeCapturingGroups = function(src) {
178178
var r = src.replace(
179-
/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
179+
/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,
180180
function(x, y) {return y ? "(?:" : x;}
181181
);
182182
return r;

0 commit comments

Comments
 (0)