mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #390] Emit a warning for duplicate link labels #326
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#326
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @rcdailey on GitHub (Apr 23, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/390
I am reviewing the link label documentation in the CommonMark spec, and it says:
An example of this situation is here:
In the above markdown, the paragraph using the link by label will point to
http://domain1.com. It's quite possible the user did not intend to duplicate the link label,mylink, twice. A warning should be issued. Both link definitions should be flagged and the warning should instruct the user to rename one of the flagged/underlined link definition labels. An example of the solution to the above violation is below:Above, I renamed the bottom link definition's label from
mylinktomylink2, and updated the paragraph to point to it.In some cases, no warning might be desired here, so like most of the other markdown lint rules, there should be a corresponding JSON configuration to silence this warning. Whatever that looks like, I leave up to whoever implements this.