2022-10-30 15:13:19 -07:00
|
|
|
# `MD011` - Reversed link syntax
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Tags: `links`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Aliases: `no-reversed-links`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-12-16 13:53:03 -08:00
|
|
|
Fixable: Some violations can be fixed by tooling
|
2022-10-29 23:21:45 -07:00
|
|
|
|
|
|
|
This rule is triggered when text that appears to be a link is encountered, but
|
|
|
|
where the syntax appears to have been reversed (the `[]` and `()` are
|
|
|
|
reversed):
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
(Incorrect link syntax)[https://www.example.com/]
|
|
|
|
```
|
|
|
|
|
|
|
|
To fix this, swap the `[]` and `()` around:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
[Correct link syntax](https://www.example.com/)
|
|
|
|
```
|
|
|
|
|
|
|
|
Note: [Markdown Extra](https://en.wikipedia.org/wiki/Markdown_Extra)-style
|
|
|
|
footnotes do not trigger this rule:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
For (example)[^1]
|
|
|
|
```
|
|
|
|
|
|
|
|
Rationale: Reversed links are not rendered as usable links.
|