Update src/editor/deserialize.js

Co-Authored-By: Bruno Windels <bruno@windels.cloud>
pull/21833/head
Tulir Asokan 2019-10-18 19:58:55 +03:00 committed by GitHub
parent a95f7be22d
commit 75bcc3f849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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}- `);