From 9506c3feb127338a2d663d16ec58d781b62ad4ed Mon Sep 17 00:00:00 2001 From: "Hasko, Vladimir" Date: Wed, 8 Feb 2023 13:59:27 +0000 Subject: [PATCH] trying fixing the broken condition when checking the 'a' links Reviewed-by: tischrei Co-authored-by: Hasko, Vladimir Co-committed-by: Hasko, Vladimir --- otc_doc_convertor/convertor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otc_doc_convertor/convertor.py b/otc_doc_convertor/convertor.py index d203a5152..40ed79fec 100644 --- a/otc_doc_convertor/convertor.py +++ b/otc_doc_convertor/convertor.py @@ -265,7 +265,7 @@ class OTCDocConvertor: for lnk in soup.body.find_all("a"): if ( lnk.string is None - and hasattr(lnk, "name") + and lnk.has_attr("name") and not re.match(r"^li\d+$", lnk.attrs["name"]) # anywhere section and not re.match(r".*section\d+$", lnk.attrs["name"])