Skip to content

Commit

Permalink
fix exception in pdf parser (#584)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?
#451 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh committed Apr 28, 2024
1 parent 9d60a84 commit d589b0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepdoc/parser/pdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ def dfs(up, dp):
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

Expand Down

0 comments on commit d589b0f

Please sign in to comment.