Repository navigation
fix: deduplicate markdown table chunks - #16143
Conversation
|
This PR is ready for review and the fix has been validated locally. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
📝 WalkthroughWalkthroughEnables ChangesMarkdown Table Deduplication Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16143 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
When markdown tables are extracted as standalone chunks, the original markdown text is still parsed from the full document content. As a result, the same table content can appear twice in chunk results: once as a dedicated table chunk, and again inside regular text chunks.
This PR fixes that duplication by parsing markdown text from the table-stripped remainder when table separation is enabled. It also enables separated table extraction in the markdown chunking entry points and adds a regression test for pipe-table duplication.
Closes #16074.
Type of change
Testing
python -m pytest -q test/unit_test/deepdoc/parser/test_markdown_parser.pyAdditional context
I also verified the fix manually in the chunk preview UI. After the change, duplicated table chunks no longer appear
![Uploading CleanShot 2026-06-17 at 16.11.54@2x.png…]()