File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -467,13 +467,14 @@ def _extract_text_and_hyperlink_recursively(
467467
468468 @contextmanager
469469 def _use_hyperlink (self , tag : Tag ):
470+ old_hyperlink : Union [AnyUrl , Path , None ] = None
471+ new_hyperlink : Union [AnyUrl , Path , None ] = None
470472 this_href = tag .get ("href" )
471473 if this_href is None :
472474 yield None
473475 else :
474476 if isinstance (this_href , str ) and this_href :
475- old_hyperlink : Union [AnyUrl , Path , None ] = self .hyperlink
476- new_hyperlink : Union [AnyUrl , Path , None ] = None
477+ old_hyperlink = self .hyperlink
477478 if self .original_url is not None :
478479 this_href = urljoin (str (self .original_url ), str (this_href ))
479480 # ugly fix for relative links since pydantic does not support them.
You can’t perform that action at this time.
0 commit comments