miyuchina / mistletoe

A fast, extensible and spec-compliant Markdown parser in pure Python.
MIT License
841 stars 119 forks source link

Emphasis around link ignored when followed by a special punctuation character #175

Closed redstoneleo closed 1 year ago

redstoneleo commented 1 year ago
s1=r'''**[Usage](http://127.0.0.1:8000/cms/pages/82/edit/)**:'''
import mistletoe
from mistletoe import Document, HTMLRenderer
rendered = mistletoe.markdown(s1, HTMLRenderer)
print(rendered)

output: <p>**<a href="http://127.0.0.1:8000/cms/pages/82/edit/">Usage</a>**:</p> the correct should be : <p><strong><a href="http://127.0.0.1:8000/cms/pages/82/edit/">Usage</a></strong>:</p>

pbodnar commented 1 year ago

@redstoneleo, thanks for the report. Luckily, this issue is already fixed in the master - by 0c05dcda471719f0400db763b0f584d710350766 within #96.

Details: This problem occurred only when using the special char of instead of the more common : (2 chars).