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
pull/14293/head
Coobiw 2024-11-27 21:41:22 +08:00 committed by GitHub
parent b1b50fc1fd
commit b6bcde143d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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":