fix exception in pdf parser (#584)

### What problem does this PR solve?
#451 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
KevinHuSh 2024-04-28 14:23:53 +08:00 committed by GitHub
parent 9d60a84958
commit d589b0f568
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -470,7 +470,8 @@ class RAGFlowPdfParser:
continue
if re.match(r"[0-9]{2,3}/[0-9]{3}$", up["text"]) \
or re.match(r"[0-9]{2,3}/[0-9]{3}$", down["text"]):
or re.match(r"[0-9]{2,3}/[0-9]{3}$", down["text"]) \
or not down["text"].strip():
i += 1
continue