Skip to content
Snippets Groups Projects
Commit 1e7cdbf8 authored by Marcel Gerber's avatar Marcel Gerber Committed by Marijn Haverbeke
Browse files

[markdown mode] Support leading whitespace in fencedCodeBlocks mode name

parent ef690441
No related merge requests found
......@@ -204,7 +204,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
state.f = state.inline;
if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
return getType(state);
} else if (modeCfg.fencedCodeBlocks && stream.match(/^```([\w+#]*)/, true)) {
} else if (modeCfg.fencedCodeBlocks && stream.match(/^```[ \t]*([\w+#]*)/, true)) {
// try switching mode
state.localMode = getMode(RegExp.$1);
if (state.localMode) state.localState = state.localMode.startState();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment