diff --git a/html_parser.py b/html_parser.py index 6bc034760a399fba07c86674209a5edd16a9c5b1..e3df8c321723ba6d84c1cf6c64afb4e9df05de00 100644 --- a/html_parser.py +++ b/html_parser.py @@ -95,6 +95,9 @@ class Parser: def parse_list_item(self, content, indent): for c in content: # remove li tag if hasattr(c, "name") and c.name == "ul": + last_content = self._data._body[-1]._content[-1] + if isinstance(last_content, TextContent): + last_content._new_line = True self.parse_list(c, indent+1) self._data._body.append(Paragraph(indent)) else: