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)
This commit is contained in:
Kevin Hu 2024-07-23 09:25:32 +08:00 committed by GitHub
parent bf2ea04d02
commit 95821f6fb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,7 +127,7 @@ class RAGFlowDocxParser:
runs_within_single_paragraph.append(run.text) # append run.text first runs_within_single_paragraph.append(run.text) # append run.text first
# wrap page break checker into a static method # wrap page break checker into a static method
if RAGFlowDocxParser.has_page_break(run._element.xml): if 'lastRenderedPageBreak' in run._element.xml:
pn += 1 pn += 1
secs.append(("".join(runs_within_single_paragraph), p.style.name)) # then concat run.text as part of the paragraph secs.append(("".join(runs_within_single_paragraph), p.style.name)) # then concat run.text as part of the paragraph