diff --git a/mdx_truly_sane_lists/mdx_truly_sane_lists.py b/mdx_truly_sane_lists/mdx_truly_sane_lists.py index 5af6370..2f66625 100644 --- a/mdx_truly_sane_lists/mdx_truly_sane_lists.py +++ b/mdx_truly_sane_lists/mdx_truly_sane_lists.py @@ -58,7 +58,7 @@ def run(self, parent, blocks): items = self.get_items(blocks.pop(0)) sibling = self.lastChild(parent) - if not self.truly_sane and (sibling is not None and sibling.tag in self.SIBLING_TAGS): + if (sibling is not None and sibling.tag in self.SIBLING_TAGS) and (sibling.tag == 'ol' or not self.truly_sane): lst = sibling if lst[-1].text: p = util.etree.Element('p')