Skip to content

Commit

Permalink
Make lookAhead work in mode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Jul 22, 2017
1 parent 0a1fb07 commit 432f0b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/mode_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@
(st.indentFailures || (st.indentFailures = [])).push(
"Indentation of line " + (i + 1) + " is " + indent + " (expected " + ws.length + ")");
}
var stream = new CodeMirror.StringStream(line);
var stream = new CodeMirror.StringStream(line, 4, {
lookAhead: function(n) { return lines[i + n] }
});
if (line == "" && mode.blankLine) mode.blankLine(state);
/* Start copied code from CodeMirror.highlight */
while (!stream.eol()) {
Expand Down

0 comments on commit 432f0b7

Please sign in to comment.