mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD054/link-image-style to add url_inline parameter (fixes #753).
This commit is contained in:
parent
84333a5f08
commit
b709a2f624
26 changed files with 347 additions and 39 deletions
|
|
@ -60,6 +60,20 @@ This rule does *not* fix scenarios that require converting a link or image to
|
|||
the `full`, `collapsed`, or `shortcut` reference styles because that involves
|
||||
naming the reference and determining where to insert it in the document.
|
||||
|
||||
Setting the `url_inline` parameter to `false` prevents the use of inline links
|
||||
with the same absolute URL text/destination and no title because such links can
|
||||
be converted to autolinks:
|
||||
|
||||
```markdown
|
||||
[https://example.com](https://example.com)
|
||||
```
|
||||
|
||||
To fix `url_inline` violations, use the simpler autolink syntax instead:
|
||||
|
||||
```markdown
|
||||
<https://example.com>
|
||||
```
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
||||
Autolinks are concise, but appear as URLs which can be long and confusing.
|
||||
Inline links and images can include descriptive text, but take up more space in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue