Skip to content

Commit 18e94f8

Browse files
authored
fix handle_funcs_dict for PP-StructureV3 in to_markdown (#4844)
1 parent 3fe80eb commit 18e94f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

paddlex/inference/pipelines/layout_parsing/result_v2.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,13 @@ def _to_markdown(self, pretty=True, show_formula_number=False) -> dict:
556556
),
557557
"algorithm": lambda block: block.content.strip("\n"),
558558
"seal": format_seal_func,
559+
"number": format_text_plain_func,
560+
"footnote": format_text_plain_func,
561+
"header": format_text_plain_func,
562+
"header_image": format_image_plain_func,
563+
"footer": format_text_plain_func,
564+
"footer_image": format_image_plain_func,
565+
"aside_text": format_text_plain_func,
559566
}
560567
for label in self["model_settings"].get("markdown_ignore_labels", []):
561568
handle_funcs_dict.pop(label, None)

0 commit comments

Comments
 (0)