mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-01 15:02:21 +00:00
cleaned
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
parent
d8b4c07173
commit
f7b58dfa51
@ -213,16 +213,12 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
|||||||
return label, None
|
return label, None
|
||||||
|
|
||||||
def handle_text_elements(self, element, docx_obj, doc):
|
def handle_text_elements(self, element, docx_obj, doc):
|
||||||
# if hasattr(element, "text"):
|
|
||||||
# paragraph = element
|
|
||||||
# else:
|
|
||||||
paragraph = docx.text.paragraph.Paragraph(element, docx_obj)
|
paragraph = docx.text.paragraph.Paragraph(element, docx_obj)
|
||||||
|
|
||||||
if paragraph.text is None:
|
if paragraph.text is None:
|
||||||
# _log.warn(f"paragraph has text==None")
|
# _log.warn(f"paragraph has text==None")
|
||||||
return
|
return
|
||||||
text = paragraph.text.strip()
|
text = paragraph.text.strip()
|
||||||
|
|
||||||
# if len(text)==0 # keep empty paragraphs, they seperate adjacent lists!
|
# if len(text)==0 # keep empty paragraphs, they seperate adjacent lists!
|
||||||
|
|
||||||
# Common styles for bullet and numbered lists.
|
# Common styles for bullet and numbered lists.
|
||||||
|
Loading…
Reference in New Issue
Block a user