From 6f309871292fda75e49e983cd5730dcc931b5082 Mon Sep 17 00:00:00 2001 From: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:10:41 +0100 Subject: [PATCH] fix: add table data check to Markdown export (#155) Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> --- deepsearch/documents/core/export.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deepsearch/documents/core/export.py b/deepsearch/documents/core/export.py index 869b949b..4d15483d 100644 --- a/deepsearch/documents/core/export.py +++ b/deepsearch/documents/core/export.py @@ -49,8 +49,7 @@ def export_to_markdown(document: Dict[str, Any]) -> str: else: markdown_text += f"{text}\n\n" - elif item_type in ("table"): - + elif item_type in ("table") and item.get("data", []): table = [] for row in item["data"]: