Update MD051/link-fragments to allow HTML's implicit "#top" fragment (fixes #1488).

This commit is contained in:
David Anson 2025-03-15 16:30:32 -07:00
parent 5749c8dcf7
commit 50300fa7af
7 changed files with 58 additions and 1 deletions

View file

@ -25749,6 +25749,26 @@ Generated by [AVA](https://avajs.dev).
'link-fragments',
],
},
{
errorContext: '[Invalid](#ToP)',
errorDetail: 'Expected: #top; Actual: #ToP',
errorRange: [
1,
15,
],
fixInfo: {
deleteCount: 4,
editColumn: 11,
insertText: '#top',
},
lineNumber: 339,
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␊
@ -26084,6 +26104,12 @@ Generated by [AVA](https://avajs.dev).
[Invalid](#C11-L4C31) {MD051}␊
## Implicit Fragments␊
[Valid](#top)␊
[Invalid](#top) {MD051}␊
<!-- markdownlint-configure-file {␊
"emphasis-style": false,␊
"heading-style": false,␊