matthewwithanm / python-markdownify

Convert HTML to Markdown
MIT License
1.17k stars 140 forks source link

Markdownify conversion results in extra `\` before end parentheses `)` #140

Closed vivienneprince closed 1 week ago

vivienneprince commented 4 months ago

Example:

from markdownify import markdownify as md

example_html = '<h2>Example Heading (Heading 2)</h2>'
mdtxt = md(example_html, heading_style = 'ATX')

>>> ## Example Heading (Heading 2\)

It doesn't consistently happen; sometimes end parentheses in headings have no issues.

So far I haven't seen this happen within p tags, but I have seen some periods (.) get converted into \. in p tags.

AlexVonB commented 1 week ago

This was fixed by #149 and is present in 0.14.0. Thanks for reporting!