diff --git a/lib/ace/edit_session/bracket_match.js b/lib/ace/edit_session/bracket_match.js index d936296f..cc634b5a 100644 --- a/lib/ace/edit_session/bracket_match.js +++ b/lib/ace/edit_session/bracket_match.js @@ -82,8 +82,8 @@ function BracketMatch() { // matches any token containing the same identifiers or a subset. In // addition, if token.type includes "rparen", then also match "lparen". // So if type.token is "paren.rparen", then typeRe will match "lparen.paren". - var typeRe = new RegExp("(\\.?[" + - token.type.replace(".", "|").replace("rparen", "lparen|rparen") + "])+"); + var typeRe = new RegExp("(\\.?" + + token.type.replace(".", "|").replace("rparen", "lparen|rparen") + ")+"); // Start searching in token, just before the character at position.column var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; @@ -135,8 +135,8 @@ function BracketMatch() { // matches any token containing the same identifiers or a subset. In // addition, if token.type includes "lparen", then also match "rparen". // So if type.token is "lparen.paren", then typeRe will match "paren.rparen". - var typeRe = new RegExp("(\\.?[" + - token.type.replace(".", "|").replace("lparen", "lparen|rparen") + "])+"); + var typeRe = new RegExp("(\\.?" + + token.type.replace(".", "|").replace("lparen", "lparen|rparen") + ")+"); // Start searching in token, after the character at position.column var valueIndex = position.column - iterator.getCurrentTokenColumn();