File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
paddlex/inference/pipelines/layout_parsing Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -435,8 +435,8 @@ def _to_markdown(self, pretty=True) -> dict:
435435
436436 markdown_content = ""
437437 last_label = None
438- seg_start_flag = None
439- seg_end_flag = None
438+ seg_start_flag = True
439+ seg_end_flag = True
440440 prev_block = None
441441 page_first_element_seg_start_flag = None
442442 page_last_element_seg_end_flag = None
@@ -468,6 +468,11 @@ def _to_markdown(self, pretty=True) -> dict:
468468 else handle_func (block )
469469 )
470470 last_label = label
471+ page_first_element_seg_start_flag = (
472+ True
473+ if page_first_element_seg_start_flag is None
474+ else page_first_element_seg_start_flag
475+ )
471476 page_last_element_seg_end_flag = seg_end_flag
472477
473478 markdown_info ["markdown_texts" ] = markdown_content
You can’t perform that action at this time.
0 commit comments