Skip to content

Commit 7e2466f

Browse files
mtaran-googlemarijnh
authored andcommitted
[runmode] Pass the mode object to the callback
Without the mode object, it's not possible to call the mode's `indent` method to compute how much a given line should be indented (which we now have a need to do in a standalone way).
1 parent 667e843 commit 7e2466f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/runmode/runmode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ CodeMirror.runMode = function(string, modespec, callback, options) {
6767
if (!stream.string && mode.blankLine) mode.blankLine(state);
6868
while (!stream.eol()) {
6969
var style = mode.token(stream, state);
70-
callback(stream.current(), style, i, stream.start, state);
70+
callback(stream.current(), style, i, stream.start, state, mode);
7171
stream.start = stream.pos;
7272
}
7373
}

0 commit comments

Comments
 (0)