mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-03-06 18:40:15 +01:00
Update MD053/link-image-reference-definitions to recognize links within square brackets (fixes #537).
This commit is contained in:
parent
08cdd9513a
commit
48f47b5214
5 changed files with 117 additions and 69 deletions
|
|
@ -46,6 +46,10 @@ Use of multi-line label: [multi-line-label][]
|
|||
|
||||
Standard link: [text](https://example.com/standard)
|
||||
|
||||
Wrapped in brackets: [[text][unique0]] [[unique1][]] [[unique2]]
|
||||
|
||||
[Embedded [text][unique3] in [unique4][] brackets [unique5]]
|
||||
|
||||
## Invalid Links
|
||||
|
||||
Missing label: [text][missing] {MD052}
|
||||
|
|
@ -61,8 +65,18 @@ Space: [text] [wrong]
|
|||
|
||||
Empty: [text][ ]
|
||||
|
||||
Code span: `[wrong]`
|
||||
|
||||
Code span: `[wrong][]`
|
||||
|
||||
Code span: `[text][wrong]`
|
||||
|
||||
Code span: `[[wrong]]`
|
||||
|
||||
Code span: `[[wrong][]]`
|
||||
|
||||
Code span: `[[text][wrong]]`
|
||||
|
||||
Escaped left text: \[text][wrong]
|
||||
|
||||
Escaped right text: [text\][wrong]
|
||||
|
|
@ -81,6 +95,10 @@ Shortcut style: ![image]
|
|||
|
||||
Image in link: [![text][image]][label] [![image][]][label] [![image]][label]
|
||||
|
||||
Wrapped in brackets: [![text][unique6]]
|
||||
|
||||
Embedded [in ![text][unique7] brackets]
|
||||
|
||||
## Invalid Images
|
||||
|
||||
Image only: ![text][missing] {MD052}
|
||||
|
|
@ -119,6 +137,14 @@ Missing[^2]
|
|||
[colon]: https://example.com/colon
|
||||
[multi-line-label]:
|
||||
https://example.com/multi-line-label
|
||||
[unique0]: https://example.com/unique0
|
||||
[unique1]: https://example.com/unique1
|
||||
[unique2]: https://example.com/unique2
|
||||
[unique3]: https://example.com/unique3
|
||||
[unique4]: https://example.com/unique4
|
||||
[unique5]: https://example.com/unique5
|
||||
[unique6]: https://example.com/unique6
|
||||
[unique7]: https://example.com/unique7
|
||||
|
||||
## Invalid Labels
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue