Skip to content

Commit

Permalink
fix(ocr_mkcontent): expand para_to_standard_format_v2 to handle list …
Browse files Browse the repository at this point in the history
…and index blocks

- Modified the condition to include List and Index block types- This change enhances the function's capability to process different paragraph types
  • Loading branch information
myhloli committed Oct 21, 2024
1 parent e4904cd commit 6440857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magic_pdf/dict2md/ocr_mkcontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def merge_para_with_text(para_block):
def para_to_standard_format_v2(para_block, img_buket_path, page_idx, drop_reason=None):
para_type = para_block['type']
para_content = {}
if para_type == BlockType.Text:
if para_type in [BlockType.Text, BlockType.List, BlockType.Index]:
para_content = {
'type': 'text',
'text': merge_para_with_text(para_block),
Expand Down

0 comments on commit 6440857

Please sign in to comment.