Skip to content

Commit e6427cd

Browse files
edemainemarijnh
authored andcommitted
Recursively compute innerMode in continuelist addon
When creating an overlay mode from e.g. `gfm`, which has `markdown` as an `innerMode`, we need to recursively compute `innerMode` via `CodeMirror.innerMode` to correctly determine `markdown` descendant mode.
1 parent 16ce81c commit e6427cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/edit/continuelist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
// If we're not in Markdown mode, fall back to normal newlineAndIndent
2525
var eolState = cm.getStateAfter(pos.line);
26-
var inner = cm.getMode().innerMode(eolState);
26+
var inner = CodeMirror.innerMode(cm.getMode(), eolState);
2727
if (inner.mode.name !== "markdown") {
2828
cm.execCommand("newlineAndIndent");
2929
return;

0 commit comments

Comments
 (0)