Certain characters in inline code incorrectly parsed (e.g., `&`)
Opened this issue · 1 comments
nschloe commented
MWE:
import mistune
from mistune.core import BlockState
markdown = mistune.create_markdown(renderer="ast")
md = r"`&<>`"
tokens = markdown(md)
print(tokens)
Output:
[{'type': 'paragraph', 'children': [{'type': 'codespan', 'raw': '&<>'}]}]
torokati44 commented
We also encountered this. The cause is 8452faf, more specifically this change, I think.
Putting HTML escaping into the parser stage, independently of the output format, is incorrect.