trentm / python-markdown2

markdown2: A fast and complete implementation of Markdown in Python
Other
2.66k stars 433 forks source link

Fix img alt text being processed as markdown (#594) #595

Closed Crozzers closed 2 months ago

Crozzers commented 3 months ago

This PR fixes #594 by preventing image alt texts from being processed as markdown.

I've added a new helper method called _hash_span which hashes the text and adds it to the html_spans table. I also made sure that _unhash_html_spans is always called towards the end of convert, so that these hashes are undone.

nicholasserra commented 2 months ago

LGTM thanks!