From 75bcc3f84913c61960b9734cd60929df3d4e369b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 18 Oct 2019 19:58:55 +0300 Subject: [PATCH] Update src/editor/deserialize.js Co-Authored-By: Bruno Windels --- src/editor/deserialize.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor/deserialize.js b/src/editor/deserialize.js index 2662d5a503..6636c9971e 100644 --- a/src/editor/deserialize.js +++ b/src/editor/deserialize.js @@ -109,7 +109,8 @@ function parseElement(n, partCreator, lastNode, state) { const indent = " ".repeat(state.listDepth - 1); if (n.parentElement.nodeName === "OL") { // The markdown parser doesn't do nested indexed lists at all, but this supports it anyway. - let index = state.listIndex[state.listIndex.length - 1]++; + let index = state.listIndex[state.listIndex.length - 1]; + state.listIndex[state.listIndex.length - 1] += 1; return partCreator.plain(`${indent}${index}. `); } else { return partCreator.plain(`${indent}- `);