From 49ac09b2cb84e544e92d7308fa54e58ba6e249d6 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Tue, 17 Feb 2026 12:45:57 +0530 Subject: [PATCH] feat: add support for rendering table cell content in markdown conversion --- surfsense_backend/app/utils/blocknote_to_markdown.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/surfsense_backend/app/utils/blocknote_to_markdown.py b/surfsense_backend/app/utils/blocknote_to_markdown.py index 0556df705..467c0e7f6 100644 --- a/surfsense_backend/app/utils/blocknote_to_markdown.py +++ b/surfsense_backend/app/utils/blocknote_to_markdown.py @@ -155,6 +155,13 @@ def _render_block(block: dict[str, Any], indent: int = 0) -> list[str]: if isinstance(cell, list): # Cell is a list of inline content cell_texts.append(_render_inline_content(cell)) + elif isinstance(cell, dict): + # Cell is a tableCell object with its own content + cell_content = cell.get("content") + if isinstance(cell_content, list): + cell_texts.append(_render_inline_content(cell_content)) + else: + cell_texts.append("") elif isinstance(cell, str): cell_texts.append(cell) else: