Closed Leonya closed 3 years ago
This is caused by the GFMFlavourDescriptor
.
As another example, the following markdown:
<i>[1](http://a/b)</i>
incorrectly renders as
<i>[1](<a href="http://a/b)</i>">http://a/b)</i></a>
rather than
<i><a href="http://a/b">1</a></i>
This is due to the GFMFlavourDescriptor
incorrectly parsing the content of the link destination as a GFM_AUTOLINK
:
Markdown:PARAGRAPH
Markdown:HTML_TAG '<i>'
Markdown:SHORT_REFERENCE_LINK
Markdown:LINK_LABEL
Markdown:[ '['
Markdown:TEXT '1'
Markdown:] ']'
Markdown:( '('
Markdown:GFM_AUTOLINK 'http://a/b)</i>'
I've pushed yet another heuristic, which should fix abovementioned cases. The proper parsing of autolinks along with other inline structures is still not done, not sure it will arrive anytime soon. (though @FirstTimeInForever might help with that at some point of time)
The following should be rendered as two adjacent links, but instead there's an error:
markdown-it
parser has no problem with this.