mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 14:04:27 +00:00
cleaned prints
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
parent
186d71a057
commit
e8229fdd4c
@ -157,10 +157,10 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
|
|||||||
_log.debug(f" - Image with alt: {element.title}, url: {element.dest}")
|
_log.debug(f" - Image with alt: {element.title}, url: {element.dest}")
|
||||||
doc.add_picture(parent=parent_element, caption=element.title)
|
doc.add_picture(parent=parent_element, caption=element.title)
|
||||||
|
|
||||||
elif isinstance(element, marko.block.Paragraph):
|
# elif isinstance(element, marko.block.Paragraph):
|
||||||
print("Paragraph:")
|
# print("Paragraph:")
|
||||||
print(element)
|
# print(element)
|
||||||
print("")
|
# print("")
|
||||||
|
|
||||||
elif isinstance(element, marko.inline.RawText):
|
elif isinstance(element, marko.inline.RawText):
|
||||||
_log.debug(f" - Paragraph (raw text): {element.children}")
|
_log.debug(f" - Paragraph (raw text): {element.children}")
|
||||||
@ -195,9 +195,6 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
|
|||||||
|
|
||||||
elif isinstance(element, marko.block.CodeBlock):
|
elif isinstance(element, marko.block.CodeBlock):
|
||||||
self.close_table(doc)
|
self.close_table(doc)
|
||||||
print("CODE BLOCK")
|
|
||||||
print(element)
|
|
||||||
print("")
|
|
||||||
_log.debug(f" - Code Block: {element.children}")
|
_log.debug(f" - Code Block: {element.children}")
|
||||||
snippet_text = str(element.children[0].children).strip()
|
snippet_text = str(element.children[0].children).strip()
|
||||||
doc.add_text(
|
doc.add_text(
|
||||||
@ -206,9 +203,6 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
|
|||||||
|
|
||||||
elif isinstance(element, marko.block.FencedCode):
|
elif isinstance(element, marko.block.FencedCode):
|
||||||
self.close_table(doc)
|
self.close_table(doc)
|
||||||
print("FENCED CODE")
|
|
||||||
print(element)
|
|
||||||
print("")
|
|
||||||
_log.debug(f" - Code Block: {element.children}")
|
_log.debug(f" - Code Block: {element.children}")
|
||||||
snippet_text = str(element.children[0].children).strip()
|
snippet_text = str(element.children[0].children).strip()
|
||||||
doc.add_text(
|
doc.add_text(
|
||||||
@ -232,9 +226,6 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
|
|||||||
if not isinstance(element, str):
|
if not isinstance(element, str):
|
||||||
self.close_table(doc)
|
self.close_table(doc)
|
||||||
_log.debug("Some other element: {}".format(element))
|
_log.debug("Some other element: {}".format(element))
|
||||||
print("SOMETHING ELSE")
|
|
||||||
print(element)
|
|
||||||
print("")
|
|
||||||
|
|
||||||
# Iterate through the element's children (if any)
|
# Iterate through the element's children (if any)
|
||||||
if not isinstance(element, marko.block.ListItem):
|
if not isinstance(element, marko.block.ListItem):
|
||||||
|
Loading…
Reference in New Issue
Block a user