File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def get_text_and_words(
139
139
final_text = add_id_to_html_tag (config .list_layout_prefix , self .id , config )
140
140
final_words = []
141
141
for i , child in enumerate (
142
- sorted (self .children , key = lambda x : x .reading_order )
142
+ sorted (filter ( lambda c : isinstance ( c , Layout ), self .children ) , key = lambda x : x .reading_order )
143
143
):
144
144
child_text , child_words = child .get_text_and_words (config )
145
145
child_prefix = add_id_to_html_tag (config .list_element_prefix , child .id , config )
Original file line number Diff line number Diff line change @@ -1371,7 +1371,7 @@ def parse_document_api_response(response: dict) -> Document:
1371
1371
and kv .id not in kv_added
1372
1372
):
1373
1373
# Ignore if the KV is already overlapping with a table
1374
- if any ([w .cell_id for w in kv .words ]):
1374
+ if any ([w .cell_id for w in kv .words ]) or layout . layout_type == LAYOUT_LIST :
1375
1375
kv_added .add (kv .id )
1376
1376
continue
1377
1377
# Removing the duplicate words
You can’t perform that action at this time.
0 commit comments