fix "char" is reserved word bracket_match.js
This commit is contained in:
parent
bc599f23d6
commit
2632685340
1 changed files with 2 additions and 2 deletions
|
|
@ -37,10 +37,10 @@ var Range = require("../range").Range;
|
|||
|
||||
function BracketMatch() {
|
||||
|
||||
this.findMatchingBracket = function(position, char) {
|
||||
this.findMatchingBracket = function(position, chr) {
|
||||
if (position.column == 0) return null;
|
||||
|
||||
var charBeforeCursor = char || this.getLine(position.row).charAt(position.column-1);
|
||||
var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1);
|
||||
if (charBeforeCursor == "") return null;
|
||||
|
||||
var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue