mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Add MD042 no-empty-links "No empty links" (fixes #24).
This commit is contained in:
parent
efe9c9e73c
commit
2612a96ae8
7 changed files with 95 additions and 17 deletions
22
doc/Rules.md
22
doc/Rules.md
|
|
@ -1004,3 +1004,25 @@ To fix this, add a header to the top of your file:
|
|||
|
||||
This is a file with a top level header
|
||||
```
|
||||
|
||||
## MD042 - No empty links
|
||||
|
||||
Tags: links
|
||||
|
||||
Aliases: no-empty-links
|
||||
|
||||
This rule is triggered when an empty link is encountered:
|
||||
|
||||
[an empty link]()
|
||||
|
||||
To fix the violation, provide a destination for the link:
|
||||
|
||||
[a valid link](https://example.com/)
|
||||
|
||||
Empty fragments will trigger this rule:
|
||||
|
||||
[an empty fragment](#)
|
||||
|
||||
But non-empty fragments will not:
|
||||
|
||||
[a valid fragment](#fragment)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue