2022-10-30 15:13:19 -07:00
|
|
|
# `MD034` - Bare URL used
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Tags: `links`, `url`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Aliases: `no-bare-urls`
|
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 whenever a URL is given that isn't surrounded by angle
|
|
|
|
brackets:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
For more information, see https://www.example.com/.
|
|
|
|
```
|
|
|
|
|
|
|
|
To fix this, add angle brackets around the URL:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
For more information, see <https://www.example.com/>.
|
|
|
|
```
|
|
|
|
|
|
|
|
Note: To use a bare URL without it being converted into a link, enclose it in
|
|
|
|
a code block, otherwise in some Markdown parsers it *will* be converted:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
`https://www.example.com`
|
|
|
|
```
|
|
|
|
|
|
|
|
Note: The following scenario does *not* trigger this rule to avoid conflicts
|
|
|
|
with `MD011`/`no-reversed-links`:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
[https://www.example.com]
|
|
|
|
```
|
|
|
|
|
|
|
|
The use of quotes around a bare link will *not* trigger this rule, either:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
"https://www.example.com"
|
|
|
|
'https://www.example.com'
|
|
|
|
```
|
|
|
|
|
|
|
|
Rationale: Without angle brackets, the URL isn't converted into a link by many
|
|
|
|
Markdown parsers.
|