mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Output: Fix a comment immediately after a <li> tag breaking the conversion
This commit is contained in:
parent
2c8e5a3a36
commit
3df6200ca7
@ -586,7 +586,7 @@ class Convert:
|
||||
else:
|
||||
text = html_tag.text
|
||||
is_list_item = tagname == 'li'
|
||||
has_sublist = is_list_item and len(html_tag) and barename(html_tag[0].tag) in ('ul', 'ol') and len(html_tag[0])
|
||||
has_sublist = is_list_item and len(html_tag) and isinstance(html_tag[0].tag, str) and barename(html_tag[0].tag) in ('ul', 'ol') and len(html_tag[0])
|
||||
if text and has_sublist and not text.strip():
|
||||
text = '' # whitespace only, ignore
|
||||
if text:
|
||||
|
Loading…
x
Reference in New Issue
Block a user