Skip escaping inside of bold

Reviewed-by: Goncharov, Artem <artem.goncharov@t-systems.com>
Co-authored-by: gtema <artem.goncharov@gmail.com>
Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
gtema 2022-10-25 12:54:53 +00:00 committed by zuul
parent 6db57a0298
commit 06b29f1a30

View File

@ -321,7 +321,8 @@ class OTCDocConvertor:
if p.string:
curr = p.string
part = re.search(to_rawize, curr)
if len(part.groups()) > 0:
# We should not escape inside of bold - this is wrong
if len(part.groups()) > 0 and p.parent.name != "b":
logging.debug(
"Found element to rawize: %s", part.group(1)
)