dealing with empty space in strong.span element

Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
This commit is contained in:
Hasko, Vladimir 2023-02-17 08:29:06 +00:00 committed by zuul
parent 14f2171339
commit 1a76d1b3b4

View File

@ -354,6 +354,11 @@ class OTCDocConvertor:
curr = el.string curr = el.string
el.string.replace_with(curr[:-1]) el.string.replace_with(curr[:-1])
el.insert_after(" ") el.insert_after(" ")
elif (
el.string
and el.span and el.span.string == " "
):
el.span.decompose()
# A very dirty hack - if we have "*" inside of em (italic) regular # A very dirty hack - if we have "*" inside of em (italic) regular
# escaping is not working anymore (pandoc is not producing proper # escaping is not working anymore (pandoc is not producing proper