Skip to content

Commit 6116503

Browse files
committed
Fix merged cells text getting duplicated when linearizing as plaintext
1 parent 9df5d26 commit 6116503

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

textractor/entities/table.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ def get_text_and_words(
933933
for cell in sorted(row, key=lambda c: c.col_index):
934934
# Siblings includes the current cell
935935
if cell.siblings:
936+
children = []
936937
first_row, first_col, last_row, last_col = cell._get_merged_cell_range()
937938
if (cell.col_index == first_col and cell.row_index == first_row) or config.table_duplicate_text_in_merged_cells:
938939
for sib in cell.siblings:

0 commit comments

Comments
 (0)