Skip to content

Commit 57d26ee

Browse files
authored
fix: fix hyperlink deserialization (#223)
Signed-off-by: Panos Vagenas <[email protected]>
1 parent b91e6c7 commit 57d26ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docling_core/types/doc/document.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,9 @@ class TextItem(DocItem):
722722
text: str # sanitized representation
723723

724724
formatting: Optional[Formatting] = None
725-
hyperlink: Optional[Union[AnyUrl, Path]] = None
725+
hyperlink: Optional[Union[AnyUrl, Path]] = Field(
726+
union_mode="left_to_right", default=None
727+
)
726728

727729
@deprecated("Use export_to_doctags() instead.")
728730
def export_to_document_tokens(self, *args, **kwargs):

0 commit comments

Comments
 (0)