pymdown-extensions
pymdown-extensions copied to clipboard
MagicLink shouldn't parse links in a link
This case incorrectly gets parsed by MagicLink and turned into a link within a link:
<a href="http://link.com">http://mdpopups.com</a>
This is incorrect, and we should be checking if the parent(s) is a link before converting.
Issue found here: https://github.com/sublimelsp/LSP/pull/1281.
It should be noted that there appears to be no parent passed into the processor in which we handle this, so context is not available. We may be able to flag our links, and revert our conversion in a Treeprocessor when such context is available.
I don't think there is anything we can do about this, and since GitHub behaves the same way, and they don't bother fixing it, it must not be that big of a problem for most people.