mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
37 lines
870 B
Markdown
37 lines
870 B
Markdown
|
|
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.
|