diff --git a/src/nestLists.ts b/src/nestLists.ts index bf7776f..1609e11 100644 --- a/src/nestLists.ts +++ b/src/nestLists.ts @@ -89,7 +89,7 @@ export function nestLists currentList.level) { const newList = listFromBlock(block, i, mode) - if (mode === 'html') { + if (currentList.mode === 'html' && newList.mode === 'html') { // Because HTML is kinda weird, nested lists needs to be nested within list items. // So while you would think that we could populate the parent list with a new sub-list, // we actually have to target the last list element (child) of the parent. @@ -97,9 +97,10 @@ export function nestLists