Loading md_to_docx_converter/src/to_html/postprocessing.py +2 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,8 @@ def unwrap_gt_lt_code_tags(soup: BeautifulSoup): lambda tag: isinstance(tag, Tag) and tag.name == "span" and len(tag.contents) == 1 and isinstance(tag.contents[0], NavigableString) ) for child in span_text_only_children: text = NavigableString(html.unescape(child.get_text())) raw_text = child.get_text().replace("`<", "<").replace(">`", ">") text = NavigableString(html.unescape(raw_text)) child.contents[0].replace_with(text) else: text = NavigableString(html.unescape(code.get_text())) Loading Loading
md_to_docx_converter/src/to_html/postprocessing.py +2 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,8 @@ def unwrap_gt_lt_code_tags(soup: BeautifulSoup): lambda tag: isinstance(tag, Tag) and tag.name == "span" and len(tag.contents) == 1 and isinstance(tag.contents[0], NavigableString) ) for child in span_text_only_children: text = NavigableString(html.unescape(child.get_text())) raw_text = child.get_text().replace("`<", "<").replace(">`", ">") text = NavigableString(html.unescape(raw_text)) child.contents[0].replace_with(text) else: text = NavigableString(html.unescape(code.get_text())) Loading