mirror of
https://github.com/docling-project/docling.git
synced 2025-06-27 05:20:05 +00:00
fix(msword_backend): handle conversion error in label parsing (#896)
Updated label parsing to use `str_to_int` with a default value to prevent potential conversion errors. Signed-off-by: Vladimir Gurevich <vladimir@beaconcure.com> Co-authored-by: Vladimir Gurevich <vladimir@beaconcure.com>
This commit is contained in:
parent
5ad6de0560
commit
722a6eb7b9
@ -242,7 +242,7 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
||||
parts = label.split(":")
|
||||
|
||||
if len(parts) == 2:
|
||||
return parts[0], int(parts[1])
|
||||
return parts[0], self.str_to_int(parts[1], None)
|
||||
|
||||
parts = self.split_text_and_number(label)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user