trentm / python-markdown2

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

Markdown rendering in image descriptions #594

Closed za3k closed 1 month ago

za3k commented 1 month ago

Describe the bug Markdown is being parsed and processed before being included as alt-text

To Reproduce

markdown2.markdown("![a*b*c](d)")

Renders as:

<p><img src="d" alt="a<em>b</em>c" /></p>\n

Expected behavior I expect the alt text to be either abc (CommonMark spec) or a*b*c (no processing at all). Either seems okay.

Debug info Version of library being used: 2.5.0 (or commit 8d3a65bc7d4f8b64af89f668eb6c60841dc0578c)

Any extras being used: No