From dd529137eb5138f82e8161a7c7902f9cbeb3e558 Mon Sep 17 00:00:00 2001 From: Idriss Sbaaoui <112825897+6ba3i@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:31:56 +0800 Subject: [PATCH] Fix: markdown table double extraction in parser (#13892) ### What problem does this PR solve? Fixes markdown tables being parsed twice (once as markdown and again as generated HTML), which caused duplicate table chunks in the chunk list UI. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- deepdoc/parser/markdown_parser.py | 4 ++-- .../test_chunk_management_within_dataset/conftest.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/deepdoc/parser/markdown_parser.py b/deepdoc/parser/markdown_parser.py index 900ef525cc..e911a22ac8 100644 --- a/deepdoc/parser/markdown_parser.py +++ b/deepdoc/parser/markdown_parser.py @@ -56,7 +56,7 @@ class RAGFlowMarkdownParser: """, re.VERBOSE, ) - working_text = replace_tables_with_rendered_html(border_table_pattern, tables) + working_text = replace_tables_with_rendered_html(border_table_pattern, tables, render=separate_tables) # Borderless Markdown table no_border_table_pattern = re.compile( @@ -68,7 +68,7 @@ class RAGFlowMarkdownParser: """, re.VERBOSE, ) - working_text = replace_tables_with_rendered_html(no_border_table_pattern, tables) + working_text = replace_tables_with_rendered_html(no_border_table_pattern, tables, render=separate_tables) # Replace any TAGS e.g.