Fix nested lists DOM generation and add tests.

This commit is contained in:
Sergio Martínez Portela 2023-05-01 20:40:02 +02:00
parent 790ef57598
commit 36a0a00113
3 changed files with 52 additions and 2 deletions

View file

@ -464,8 +464,9 @@ class Headline:
if isinstance(c, dom.ListItem)
]
if ((len(list_children) > 0)
and (len(list_children[-1].orig.indentation)
if (len(list_children) == 0):
break
if ((len(list_children[-1].orig.indentation)
<= len(line.indentation))):
# No more breaking out of lists, it's indentation
# is less than ours