From 06b29f1a3021db20dcb764a13ff0ef6e14b2289b Mon Sep 17 00:00:00 2001 From: gtema Date: Tue, 25 Oct 2022 12:54:53 +0000 Subject: [PATCH] Skip escaping inside of bold Reviewed-by: Goncharov, Artem Co-authored-by: gtema Co-committed-by: gtema --- otc_doc_convertor/convertor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/otc_doc_convertor/convertor.py b/otc_doc_convertor/convertor.py index 3d333955..8acbbe24 100644 --- a/otc_doc_convertor/convertor.py +++ b/otc_doc_convertor/convertor.py @@ -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) )