mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD051/link-fragments to identify and fix scenarios where the link fragment has the wrong case (fixes #605).
This commit is contained in:
parent
d352d4ece1
commit
ac8f495ea2
8 changed files with 146 additions and 14 deletions
|
|
@ -21814,12 +21814,16 @@ Generated by [AVA](https://avajs.dev).
|
|||
},
|
||||
{
|
||||
errorContext: '[Invalid](#hrefandid)',
|
||||
errorDetail: null,
|
||||
errorDetail: 'Expected: #HREFandID; Actual: #hrefandid',
|
||||
errorRange: [
|
||||
1,
|
||||
21,
|
||||
],
|
||||
fixInfo: null,
|
||||
fixInfo: {
|
||||
deleteCount: 10,
|
||||
editColumn: 11,
|
||||
insertText: '#HREFandID',
|
||||
},
|
||||
lineNumber: 152,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
|
|
@ -21889,6 +21893,59 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-fragments',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[Title](#Valid-Fragments)',
|
||||
errorDetail: 'Expected: #valid-fragments; Actual: #Valid-Fragments',
|
||||
errorRange: [
|
||||
1,
|
||||
25,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 16,
|
||||
editColumn: 9,
|
||||
insertText: '#valid-fragments',
|
||||
},
|
||||
lineNumber: 166,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
'MD051',
|
||||
'link-fragments',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[ALL CAPS](#NAMEDLINK)',
|
||||
errorDetail: 'Expected: #namedlink; Actual: #NAMEDLINK',
|
||||
errorRange: [
|
||||
1,
|
||||
22,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 10,
|
||||
editColumn: 12,
|
||||
insertText: '#namedlink',
|
||||
},
|
||||
lineNumber: 168,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
'MD051',
|
||||
'link-fragments',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '#idLINK',
|
||||
errorDetail: 'Expected: #idlink; Actual: #idLINK',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 170,
|
||||
ruleDescription: 'Link fragments should be valid',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md051.md',
|
||||
ruleNames: [
|
||||
'MD051',
|
||||
'link-fragments',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Valid/Invalid Link Fragments␊
|
||||
␊
|
||||
|
|
@ -22041,7 +22098,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
[Invalid](#myname) {MD051}␊
|
||||
␊
|
||||
[Invalid](#hrefandid) {MD051}␊
|
||||
[Invalid](#HREFandID) {MD051}␊
|
||||
␊
|
||||
[Invalid](#name-for-other-element) {MD051}␊
|
||||
␊
|
||||
|
|
@ -22053,6 +22110,16 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
[badref]: #missing␊
|
||||
␊
|
||||
## Inconsistent Case Fragments␊
|
||||
␊
|
||||
[Title](#valid-fragments) {MD051}␊
|
||||
␊
|
||||
[ALL CAPS](#namedlink) {MD051}␊
|
||||
␊
|
||||
[MiXeD][mixedref] {MD051}␊
|
||||
␊
|
||||
[mixedref]: #idLINK␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"emphasis-style": false,␊
|
||||
"heading-style": false,␊
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue