Skip to content

Commit

Permalink
further fix for matchBrackets
Browse files Browse the repository at this point in the history
(courtesy of Mark Lentczner)
  • Loading branch information
marijnh committed Feb 18, 2011
1 parent f1e7405 commit 569a3d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ var CodeMirror = (function() {
var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];
if (!match) return;
var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles;
for (var off = forward ? pos + 1 : pos, i = 0, e = st.length; i < e; i+=2)
for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2)
if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;}

var stack = [line.text.charAt(pos)], re = /[(){}[\]]/;
Expand Down

0 comments on commit 569a3d0

Please sign in to comment.