Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
Maksym Lysak 2024-11-12 09:51:48 +01:00
parent d8b4c07173
commit f7b58dfa51

View File

@ -213,16 +213,12 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
return label, None
def handle_text_elements(self, element, docx_obj, doc):
# if hasattr(element, "text"):
# paragraph = element
# else:
paragraph = docx.text.paragraph.Paragraph(element, docx_obj)
if paragraph.text is None:
# _log.warn(f"paragraph has text==None")
return
text = paragraph.text.strip()
# if len(text)==0 # keep empty paragraphs, they seperate adjacent lists!
# Common styles for bullet and numbered lists.