mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD052/reference-links-images to add a shortcut_syntax parameter for opting into shortcut scanning (fixes #915).
This commit is contained in:
parent
a736588958
commit
c118c1160a
13 changed files with 433 additions and 29 deletions
|
@ -18,10 +18,13 @@ Shortcut: ![image]
|
|||
[image]: https://example.com/image
|
||||
```
|
||||
|
||||
A link or image renders correctly when a corresponding label is defined, but
|
||||
the text displays with brackets if the label is not present. This rule warns
|
||||
of undefined labels for "full" and "collapsed" reference syntax.
|
||||
A link or image renders correctly when the corresponding label is defined, but
|
||||
displays as text with brackets when the label is not present. By default, this
|
||||
rule warns of undefined labels for "full" and "collapsed" reference syntax but
|
||||
not for "shortcut" syntax because it is ambiguous.
|
||||
|
||||
> "Shortcut" syntax is ambiguous and a missing label will not generate an
|
||||
error. For example, `[shortcut]` could be a shortcut link or the text
|
||||
"shortcut" in brackets.
|
||||
The text `[example]` could be a shortcut link or the text "example" in brackets,
|
||||
so "shortcut" syntax is ignored by default. To include "shortcut" syntax, set
|
||||
the `include_shortcut` parameter to `true`. Note that doing so produces warnings
|
||||
for *all* text in the document that *could* be a shortcut. If bracketed text is
|
||||
intentional, brackets can be escaped with the `\` character: `\[example\]`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue