Loading md_to_docx_converter/src/to_html/postprocessing.py +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ def unwrap_gt_lt_code_tags(soup: BeautifulSoup): During preprocessing, sections of text marked by a beginning `<` and an ending `>` needed to be enclosed in code blocks for Pandoc to preserve the text. """ # codes = soup.find_all("code", lambda tag: tag.parent and tag.parent.name != "pre") codes = soup.select("code:not(pre > code)") codes = soup.select("code:not(pre > code):not(em > code)") for code in codes: code.unwrap() Loading Loading
md_to_docx_converter/src/to_html/postprocessing.py +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ def unwrap_gt_lt_code_tags(soup: BeautifulSoup): During preprocessing, sections of text marked by a beginning `<` and an ending `>` needed to be enclosed in code blocks for Pandoc to preserve the text. """ # codes = soup.find_all("code", lambda tag: tag.parent and tag.parent.name != "pre") codes = soup.select("code:not(pre > code)") codes = soup.select("code:not(pre > code):not(em > code)") for code in codes: code.unwrap() Loading