From 95821f6fb6c8f67f7a13c14aa72b7fa601e763f9 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 23 Jul 2024 09:25:32 +0800 Subject: [PATCH] fix bug of ragflowdocxpparser (#1642) ### What problem does this PR solve? #1627 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- deepdoc/parser/docx_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepdoc/parser/docx_parser.py b/deepdoc/parser/docx_parser.py index 6bce3d622..578041099 100644 --- a/deepdoc/parser/docx_parser.py +++ b/deepdoc/parser/docx_parser.py @@ -127,7 +127,7 @@ class RAGFlowDocxParser: runs_within_single_paragraph.append(run.text) # append run.text first # wrap page break checker into a static method - if RAGFlowDocxParser.has_page_break(run._element.xml): + if 'lastRenderedPageBreak' in run._element.xml: pn += 1 secs.append(("".join(runs_within_single_paragraph), p.style.name)) # then concat run.text as part of the paragraph