markdownlint/doc/md034.md

45 lines
986 B
Markdown
Raw Normal View History

# MD034 - Bare URL used
Tags: links, url
Aliases: no-bare-urls
Fixable: Most violations can be fixed by tooling
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.