Skip to content

Commit

Permalink
[markdown mode] Don't reset inline styles at start of continued list …
Browse files Browse the repository at this point in the history
…item

Closes codemirror#6012
  • Loading branch information
marijnh authored and cone56 committed Jan 6, 2020
1 parent 02005b5 commit 7e39392
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mode/markdown/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
if (state.indentationDiff === null) {
state.indentationDiff = state.indentation;
if (prevLineIsList) {
// Reset inline styles which shouldn't propagate aross list items
state.em = false;
state.strong = false;
state.code = false;
state.strikethrough = false;

state.list = null;
// While this list item's marker's indentation is less than the deepest
// list item's content's indentation,pop the deepest list item
Expand Down Expand Up @@ -226,6 +220,11 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {

// Add this list item's content's indentation to the stack
state.listStack.push(state.indentation);
// Reset inline styles which shouldn't propagate aross list items
state.em = false;
state.strong = false;
state.code = false;
state.strikethrough = false;

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

0 comments on commit 7e39392

Please sign in to comment.