-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
A-documentationArea: Adding or improving documentationArea: Adding or improving documentationA-lintArea: New lintsArea: New lintsL-correctnessLint: Belongs in the correctness lint groupLint: Belongs in the correctness lint groupT-ASTType: Requires working with the ASTType: Requires working with the ASTgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
I often come across the situation in markdown when I accidentally write the following:
[useful text][reference]
[reference](<example.com>)This, though it might look like a reference style link, is not:
[useful text][reference]
The correct syntax is as follows:
[useful text][reference]
[reference]: <example.com>Clippy could lint against this likely-malformed reference link.
Notes:
- This lint should only trigger if
[reference](<link>)is on a line on its own (e.g. would be a valid reference target) andreferencecould be a valid reference key. - This lint should not trigger if there is any escaping of the in-text part of the reference which makes it not a valid reference link, even if it renders [like][so] in the output.
- I don't think [bracketed][words] would ever be desired except in a code block about markdown, so this lint shouldn't have a lot of real-world false positives.
Metadata
Metadata
Assignees
Labels
A-documentationArea: Adding or improving documentationArea: Adding or improving documentationA-lintArea: New lintsArea: New lintsL-correctnessLint: Belongs in the correctness lint groupLint: Belongs in the correctness lint groupT-ASTType: Requires working with the ASTType: Requires working with the ASTgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy