Parcourir la source
Fix: exception layout_type in is_caption (#9028)
### What problem does this PR solve?
Exception layout_type in is_caption.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.20.0
Yongteng Lei
il y a 3 mois
Parent
révision
2ae8f2cf00
Aucun compte lié à l'adresse e-mail de l'auteur
|
|
|
|
|
|
|
|
r"[图表]+[ 0-9::]{2,}" |
|
|
r"[图表]+[ 0-9::]{2,}" |
|
|
] |
|
|
] |
|
|
if any([re.match(p, bx["text"].strip()) for p in patt]) \ |
|
|
if any([re.match(p, bx["text"].strip()) for p in patt]) \ |
|
|
or bx["layout_type"].find("caption") >= 0: |
|
|
|
|
|
|
|
|
or bx.get("layout_type", "").find("caption") >= 0: |
|
|
return True |
|
|
return True |
|
|
return False |
|
|
return False |
|
|
|
|
|
|