definitionDuplicates
Reports duplicate definition identifiers (case-insensitive).
✅ This rule is included in the md logical preset.
In Markdown, defining the same identifier multiple times can lead to unintended or incorrect link and image references.
Only the first definition for an identifier is used, making subsequent definitions misleading and potentially confusing for readers and maintainers.
Definition identifiers are case-insensitive, so earth and Earth are treated as duplicates.
Examples
Section titled “Examples”[mercury]: https://example.com/mercury[mercury]: https://example.com/venus[earth]: https://example.com/earth[Earth]: https://example.com/mars[venus]: https://example.com/venus[mars]: https://example.com/mars[venus]: https://example.com/jupiter[mercury]: https://example.com/mercury[venus]: https://example.com/venus[earth]: https://example.com/earth[mars]: https://example.com/mars[jupiter]: https://example.com/jupiter[//]: # "This is a comment 1"
[//]: <> (This is a comment 2)When Not To Use It
Section titled “When Not To Use It”If you are using a custom Markdown processor that handles duplicate definitions differently, or intentionally use duplicate definitions for an unusual framework or workflow, you might want to disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.