Update MD053/link-image-reference-definitions to recognize links within square brackets (fixes #537).

This commit is contained in:
David Anson 2022-07-30 16:12:27 -07:00
parent 08cdd9513a
commit 48f47b5214
5 changed files with 117 additions and 69 deletions

View file

@ -33688,7 +33688,7 @@ Generated by [AVA](https://avajs.dev).
15,
],
fixInfo: null,
lineNumber: 51,
lineNumber: 55,
ruleDescription: 'Reference links and images should use a label that is defined',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md052',
ruleNames: [
@ -33704,7 +33704,7 @@ Generated by [AVA](https://avajs.dev).
15,
],
fixInfo: null,
lineNumber: 53,
lineNumber: 57,
ruleDescription: 'Reference links and images should use a label that is defined',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md052',
ruleNames: [
@ -33720,7 +33720,7 @@ Generated by [AVA](https://avajs.dev).
14,
],
fixInfo: null,
lineNumber: 55,
lineNumber: 59,
ruleDescription: 'Reference links and images should use a label that is defined',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md052',
ruleNames: [
@ -33736,7 +33736,7 @@ Generated by [AVA](https://avajs.dev).
16,
],
fixInfo: null,
lineNumber: 86,
lineNumber: 104,
ruleDescription: 'Reference links and images should use a label that is defined',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md052',
ruleNames: [
@ -33752,7 +33752,7 @@ Generated by [AVA](https://avajs.dev).
16,
],
fixInfo: null,
lineNumber: 88,
lineNumber: 106,
ruleDescription: 'Reference links and images should use a label that is defined',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md052',
ruleNames: [
@ -33768,7 +33768,7 @@ Generated by [AVA](https://avajs.dev).
25,
],
fixInfo: null,
lineNumber: 150,
lineNumber: 176,
ruleDescription: 'Reference links and images should use a label that is defined',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md052',
ruleNames: [
@ -33784,7 +33784,7 @@ Generated by [AVA](https://avajs.dev).
10,
],
fixInfo: null,
lineNumber: 164,
lineNumber: 190,
ruleDescription: 'Reference links and images should use a label that is defined',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md052',
ruleNames: [
@ -33802,7 +33802,7 @@ Generated by [AVA](https://avajs.dev).
fixInfo: {
deleteCount: -1,
},
lineNumber: 126,
lineNumber: 152,
ruleDescription: 'Link and image reference definitions should be needed',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md053',
ruleNames: [
@ -33820,7 +33820,7 @@ Generated by [AVA](https://avajs.dev).
fixInfo: {
deleteCount: -1,
},
lineNumber: 129,
lineNumber: 155,
ruleDescription: 'Link and image reference definitions should be needed',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md053',
ruleNames: [
@ -33838,7 +33838,7 @@ Generated by [AVA](https://avajs.dev).
fixInfo: {
deleteCount: -1,
},
lineNumber: 132,
lineNumber: 158,
ruleDescription: 'Link and image reference definitions should be needed',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md053',
ruleNames: [
@ -33854,7 +33854,7 @@ Generated by [AVA](https://avajs.dev).
44,
],
fixInfo: null,
lineNumber: 134,
lineNumber: 160,
ruleDescription: 'Link and image reference definitions should be needed',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md053',
ruleNames: [
@ -33870,7 +33870,7 @@ Generated by [AVA](https://avajs.dev).
44,
],
fixInfo: null,
lineNumber: 137,
lineNumber: 163,
ruleDescription: 'Link and image reference definitions should be needed',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md053',
ruleNames: [
@ -33927,6 +33927,10 @@ Generated by [AVA](https://avajs.dev).
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}␊
@ -33942,8 +33946,18 @@ Generated by [AVA](https://avajs.dev).
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]␊
@ -33962,6 +33976,10 @@ Generated by [AVA](https://avajs.dev).
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}␊
@ -34000,6 +34018,14 @@ Generated by [AVA](https://avajs.dev).
[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␊