Skip to content

Commit

Permalink
fix(mkmarkdown): add 2 space after image and table URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
myhloli committed Jul 13, 2024
1 parent dad4258 commit ff13c8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magic_pdf/dict2md/ocr_mkcontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def ocr_mk_markdown_with_para_core_v2(paras_of_layout, mode, img_buket_path=""):
for line in block['lines']:
for span in line['spans']:
if span['type'] == ContentType.Image:
para_text += f"\n![]({join_path(img_buket_path, span['image_path'])})\n"
para_text += f"\n![]({join_path(img_buket_path, span['image_path'])}) \n"
for block in para_block['blocks']: # 2nd.拼image_caption
if block['type'] == BlockType.ImageCaption:
para_text += merge_para_with_text(block)
Expand All @@ -128,7 +128,7 @@ def ocr_mk_markdown_with_para_core_v2(paras_of_layout, mode, img_buket_path=""):
for line in block['lines']:
for span in line['spans']:
if span['type'] == ContentType.Table:
para_text += f"\n![]({join_path(img_buket_path, span['image_path'])})\n"
para_text += f"\n![]({join_path(img_buket_path, span['image_path'])}) \n"
for block in para_block['blocks']: # 3rd.拼table_footnote
if block['type'] == BlockType.TableFootnote:
para_text += merge_para_with_text(block)
Expand Down

0 comments on commit ff13c8e

Please sign in to comment.