Update MD034/no-bare-urls to ignore "[link]" scenario that conflicts with MD011/no-reversed-links (fixes #268).

This commit is contained in:
David Anson 2020-04-01 20:21:36 -07:00
parent 29f16bf402
commit dd66a33d75
8 changed files with 60 additions and 27 deletions

View file

@ -1248,14 +1248,20 @@ To fix this, add angle brackets around the URL:
For more information, see <https://www.example.com/>.
```
Note: if you do want 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:
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]
```
Rationale: Without angle brackets, the URL isn't converted into a link in many
markdown parsers.