Skip to content

Commit 1200b14

Browse files
committed
[markdown mode] Don't reset inline styles at start of continued list item
Closes codemirror#6012
1 parent db6fd33 commit 1200b14

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

mode/markdown/markdown.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
162162
if (state.indentationDiff === null) {
163163
state.indentationDiff = state.indentation;
164164
if (prevLineIsList) {
165-
// Reset inline styles which shouldn't propagate aross list items
166-
state.em = false;
167-
state.strong = false;
168-
state.code = false;
169-
state.strikethrough = false;
170-
171165
state.list = null;
172166
// While this list item's marker's indentation is less than the deepest
173167
// list item's content's indentation,pop the deepest list item
@@ -226,6 +220,11 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
226220

227221
// Add this list item's content's indentation to the stack
228222
state.listStack.push(state.indentation);
223+
// Reset inline styles which shouldn't propagate aross list items
224+
state.em = false;
225+
state.strong = false;
226+
state.code = false;
227+
state.strikethrough = false;
229228

230229
if (modeCfg.taskLists && stream.match(taskListRE, false)) {
231230
state.taskList = true;

0 commit comments

Comments
 (0)