diff --git a/otc_doc_convertor/convertor.py b/otc_doc_convertor/convertor.py index f87f5374..3a94d7ec 100644 --- a/otc_doc_convertor/convertor.py +++ b/otc_doc_convertor/convertor.py @@ -346,7 +346,7 @@ class OTCDocConvertor: # Another hack: sometimes bold elements ends with space. This is not # valid from rst pov and we need to fix that by dropping this space and # inject a space after strong block - for el in soup.body.find_all("strong"): + for el in soup.body.find_all(["strong", "b"]): if ( el.string and el.string[-1] == " " @@ -355,8 +355,8 @@ class OTCDocConvertor: el.string.replace_with(curr[:-1]) el.insert_after(" ") elif ( - el.string - and el.span and el.span.string == " " + el.span + and el.span.string and el.span.string == " " ): el.span.decompose()