mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD051/link-fragments to handle links and images in headings (fixes #945).
This commit is contained in:
parent
6a2b86753b
commit
a736588958
5 changed files with 133 additions and 47 deletions
|
|
@ -46,6 +46,16 @@
|
|||
|
||||
[Valid](#en-t%C3%AAte-valide-dans-fran%C3%A7ais-pour-v%C3%A9rification)
|
||||
|
||||
[Valid](#valid-heading-is-a-link)
|
||||
|
||||
[Valid](#valid-heading-has-a-link)
|
||||
|
||||
[Valid](#valid-heading-is-a-reference-link)
|
||||
|
||||
[Valid](#valid-heading-has-a-reference-link)
|
||||
|
||||
[Valid](#valid-heading-has-)
|
||||
|
||||
[Valid](#namedlink)
|
||||
|
||||
[Valid](#idlink)
|
||||
|
|
@ -127,6 +137,18 @@ Text
|
|||
|
||||
### En-tête Valide Dans Français Pour Vérification
|
||||
|
||||
### [Valid Heading Is a Link](https://example.com)
|
||||
|
||||
### Valid Heading [Has a Link](https://example.com)
|
||||
|
||||
### [Valid Heading Is a Reference Link][goodref]
|
||||
|
||||
### Valid Heading [Has a Reference Link][goodref]
|
||||
|
||||
### 
|
||||
|
||||
### Valid Heading Has 
|
||||
|
||||
<a name="namedlink"></a>
|
||||
|
||||
<a id = idlink></a>
|
||||
|
|
@ -147,6 +169,8 @@ Text
|
|||
|
||||
## Invalid Fragments
|
||||
|
||||
[Invalid](#valid-heading-is-an-image) {MD051}
|
||||
|
||||
[Invalid](#valid-heading-2004-) {MD051}
|
||||
|
||||
[Invalid](#valid-repeated-heading-3) {MD051}
|
||||
|
|
|
|||
|
|
@ -23961,6 +23961,22 @@ Generated by [AVA](https://avajs.dev).
|
|||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: '[Invalid](#valid-heading-is-an-image)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
37,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 172,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
'MD051',
|
||||
'link-fragments',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[Invalid](#valid-heading-2004-)',
|
||||
errorDetail: null,
|
||||
|
|
@ -23969,7 +23985,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
31,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 150,
|
||||
lineNumber: 174,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -23985,7 +24001,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 152,
|
||||
lineNumber: 176,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24001,7 +24017,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
28,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 154,
|
||||
lineNumber: 178,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24017,7 +24033,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
18,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 156,
|
||||
lineNumber: 180,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24037,7 +24053,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
editColumn: 11,
|
||||
insertText: '#HREFandID',
|
||||
},
|
||||
lineNumber: 158,
|
||||
lineNumber: 182,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24053,7 +24069,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
34,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 160,
|
||||
lineNumber: 184,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24069,7 +24085,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
34,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 162,
|
||||
lineNumber: 186,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24085,7 +24101,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
39,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 164,
|
||||
lineNumber: 188,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24098,7 +24114,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorDetail: null,
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 166,
|
||||
lineNumber: 190,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24114,7 +24130,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
28,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 171,
|
||||
lineNumber: 195,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24134,7 +24150,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
editColumn: 9,
|
||||
insertText: '#valid-fragments',
|
||||
},
|
||||
lineNumber: 175,
|
||||
lineNumber: 199,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24154,7 +24170,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
editColumn: 12,
|
||||
insertText: '#namedlink',
|
||||
},
|
||||
lineNumber: 177,
|
||||
lineNumber: 201,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24167,7 +24183,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorDetail: 'Expected: #namedlink; Actual: #NAMEDLINK',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 179,
|
||||
lineNumber: 203,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24187,7 +24203,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
editColumn: 13,
|
||||
insertText: '#idlink',
|
||||
},
|
||||
lineNumber: 184,
|
||||
lineNumber: 208,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24203,7 +24219,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
26,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 219,
|
||||
lineNumber: 243,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24219,7 +24235,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
26,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 221,
|
||||
lineNumber: 245,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24235,7 +24251,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
20,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 223,
|
||||
lineNumber: 247,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24251,7 +24267,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
23,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 225,
|
||||
lineNumber: 249,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24267,7 +24283,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
22,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 227,
|
||||
lineNumber: 251,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24283,7 +24299,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
42,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 229,
|
||||
lineNumber: 253,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24299,7 +24315,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
21,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 231,
|
||||
lineNumber: 255,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24315,7 +24331,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
21,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 233,
|
||||
lineNumber: 257,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
|
|
@ -24372,6 +24388,16 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
[Valid](#en-t%C3%AAte-valide-dans-fran%C3%A7ais-pour-v%C3%A9rification)␊
|
||||
␊
|
||||
[Valid](#valid-heading-is-a-link)␊
|
||||
␊
|
||||
[Valid](#valid-heading-has-a-link)␊
|
||||
␊
|
||||
[Valid](#valid-heading-is-a-reference-link)␊
|
||||
␊
|
||||
[Valid](#valid-heading-has-a-reference-link)␊
|
||||
␊
|
||||
[Valid](#valid-heading-has-)␊
|
||||
␊
|
||||
[Valid](#namedlink)␊
|
||||
␊
|
||||
[Valid](#idlink)␊
|
||||
|
|
@ -24453,6 +24479,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
### En-tête Valide Dans Français Pour Vérification␊
|
||||
␊
|
||||
### [Valid Heading Is a Link](https://example.com)␊
|
||||
␊
|
||||
### Valid Heading [Has a Link](https://example.com)␊
|
||||
␊
|
||||
### [Valid Heading Is a Reference Link][goodref]␊
|
||||
␊
|
||||
### Valid Heading [Has a Reference Link][goodref]␊
|
||||
␊
|
||||
### ␊
|
||||
␊
|
||||
### Valid Heading Has ␊
|
||||
␊
|
||||
<a name="namedlink"></a>␊
|
||||
␊
|
||||
<a id = idlink></a>␊
|
||||
|
|
@ -24473,6 +24511,8 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
## Invalid Fragments␊
|
||||
␊
|
||||
[Invalid](#valid-heading-is-an-image) {MD051}␊
|
||||
␊
|
||||
[Invalid](#valid-heading-2004-) {MD051}␊
|
||||
␊
|
||||
[Invalid](#valid-repeated-heading-3) {MD051}␊
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue