mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-09-01 15:32:24 +08:00
fix: Title text partially missing issue in recovery_to_markdown.py (#14216)
* fix: Title text partially missing issue in `recovery_to_markdown.py` * fix: Title text partially missing issue in `recovery_to_markdown.py` * fix the code style for pr
This commit is contained in:
@@ -157,7 +157,12 @@ def convert_info_markdown(res, save_folder, img_name):
|
||||
f"""<div align="center">\n\t<img src="{img_name+"/"+img_file_name}">\n</div>"""
|
||||
)
|
||||
elif region["type"].lower() == "title":
|
||||
markdown_string.append(f"""# {region["res"][0]["text"]}""")
|
||||
markdown_string.append(
|
||||
f"""# {region['res'][0]['text']}"""
|
||||
+ "".join(
|
||||
[" " + one_region["text"] for one_region in region["res"][1:]]
|
||||
)
|
||||
)
|
||||
elif region["type"].lower() == "table":
|
||||
markdown_string.append(region["res"]["html"])
|
||||
elif region["type"].lower() == "header" or region["type"].lower() == "footer":
|
||||
|
||||
Reference in New Issue
Block a user