mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
26 lines
453 B
Markdown
26 lines
453 B
Markdown
|
|
This rule is triggered when an empty link is encountered:
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
[an empty link]()
|
||
|
|
```
|
||
|
|
|
||
|
|
To fix the violation, provide a destination for the link:
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
[a valid link](https://example.com/)
|
||
|
|
```
|
||
|
|
|
||
|
|
Empty fragments will trigger this rule:
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
[an empty fragment](#)
|
||
|
|
```
|
||
|
|
|
||
|
|
But non-empty fragments will not:
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
[a valid fragment](#fragment)
|
||
|
|
```
|
||
|
|
|
||
|
|
Rationale: Empty links do not lead anywhere and therefore don't function as links.
|