diff --git a/block.go b/block.go index f9ce9e34..3f4af787 100644 --- a/block.go +++ b/block.go @@ -1175,8 +1175,9 @@ gatherlines: if containsBlankLine { // end the list if the type changed after a blank line - if (*flags&LIST_TYPE_ORDERED != 0 && p.uliPrefix(chunk) > 0) || - (*flags&LIST_TYPE_ORDERED == 0 && p.oliPrefix(chunk) > 0) { + if indent <= itemIndent && + ((*flags&LIST_TYPE_ORDERED != 0 && p.uliPrefix(chunk) > 0) || + (*flags&LIST_TYPE_ORDERED == 0 && p.oliPrefix(chunk) > 0)) { *flags |= LIST_ITEM_END_OF_LIST break gatherlines diff --git a/block_test.go b/block_test.go index bb3a50b7..f3618fe7 100644 --- a/block_test.go +++ b/block_test.go @@ -960,6 +960,14 @@ func TestDefinitionList(t *testing.T) { "
Definition b
Text 2
\n", + + "Term 1\n: Definition a\n\n Text 1\n\n 1. First\n 2. Second", + "Definition a
\n\n" + + "Text 1
\n\n" + + "