Closed pelid closed 2 years ago
Hi @pelid, the # Header with [link](
from your testing input is not a valid markdown - the link code is not finished, so the parsing logically fails. So is your requirement to return some nice error from mistletoe, or possibly to fallback to rendering a simple text instead? I would see this as a feature request then.
I don't know what the best behaviour would be, but a random exception is likely the worst possible solution. A better behaviour would be a sane, catchable mistletoe exception on invalid markdown. However, it could be argued that it is just text that, on first sight, looks like possibly markdown, while it is in fact just text. It could be a weird smiley: )[<>](
. Would it be illegal to have this in a markdown text?
Fixed in the master. This turned out to be a very simple one. :) So I don't even add unit tests this time.
Got unexpected
IndexError
during rendering of preview for user input. Steps to reproduce are below:Looks like a bug.
Was used mistletoe of version 0.7.2.