mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-10 21:40:00 +00:00
Bug: unexpected behavior when using Auto-Links and Auto-Identifiers extensions #569
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @keylime-unicorn on GitHub (Oct 5, 2022).
Combining the Auto-Link and the Auto-Identifier extensions results in an unexpected parse of the original markdown. Using only the Auto-Links extension generates the expected parse, so the issue only occurs when the two extensions are used together.
The following markdown was used to test this issue:

When only using the Auto-Links extension, the HTML generated from the markdown above looks like this:

When using both the Auto-Link and the Auto-Identifier extensions, the HTML generated from the markdown above looks like this:

It seems that the issue only occurs when the text in the nested square brackets exactly matches an existing heading in the markdown document.