mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Add support for named heading fragments as supported by some platforms (fixes #830).
This commit is contained in:
parent
3dcb66cac5
commit
7a794192ca
8 changed files with 295 additions and 18 deletions
|
|
@ -171,6 +171,55 @@ Text
|
|||
|
||||
[mixedref]: #idLINK
|
||||
|
||||
## Valid Named Fragments
|
||||
|
||||
[Valid](#named-fragment)
|
||||
|
||||
[Valid](#valid-heading-with-named-fragment-named-fragment)
|
||||
|
||||
[Valid](#another_fragment_123)
|
||||
|
||||
[Valid](#valid-heading-with-another-named-fragment-another_fragment_123)
|
||||
|
||||
[Valid](#closed-atx)
|
||||
|
||||
[Valid](#setext)
|
||||
|
||||
### Valid Heading with Named Fragment {#named-fragment}
|
||||
|
||||
### Valid Heading with Another Named Fragment {#another_fragment_123}
|
||||
|
||||
### Valid Closed ATX Heading with Named Fragment {#closed-atx} ###
|
||||
|
||||
Valid Setext Heading with Named Fragment {#setext}
|
||||
--------------------------------------------------
|
||||
|
||||
## Invalid Named Fragments
|
||||
|
||||
### Invalid Heading with Named Fragment {#embedded space}
|
||||
|
||||
### Invalid Heading with Named Fragment {#hyphen--run}
|
||||
|
||||
### Invalid Heading with Named Fragment {#UpperCase}
|
||||
|
||||
{#named-fragment-outside-heading}
|
||||
|
||||
[Invalid](#embedded-space) {MD051}
|
||||
|
||||
[Invalid](#embedded_space) {MD051}
|
||||
|
||||
[Invalid](#embedded) {MD051}
|
||||
|
||||
[Invalid](#hyphen--run) {MD051}
|
||||
|
||||
[Invalid](#hyphen-run) {MD051}
|
||||
|
||||
[Invalid](#named-fragment-outside-heading) {MD051}
|
||||
|
||||
[Invalid](#UpperCase) {MD051}
|
||||
|
||||
[Invalid](#uppercase) {MD051}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"emphasis-style": false,
|
||||
"heading-style": false,
|
||||
|
|
|
|||
|
|
@ -23709,6 +23709,134 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-fragments',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[Invalid](#embedded-space)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
26,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 207,
|
||||
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](#embedded_space)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
26,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 209,
|
||||
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](#embedded)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
20,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 211,
|
||||
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](#hyphen--run)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
23,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 213,
|
||||
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](#hyphen-run)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
22,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 215,
|
||||
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](#named-fragment-outside-heading)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
42,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 217,
|
||||
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](#UpperCase)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
21,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 219,
|
||||
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](#uppercase)',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
21,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 221,
|
||||
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␊
|
||||
␊
|
||||
|
|
@ -23883,6 +24011,55 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
[mixedref]: #idLINK␊
|
||||
␊
|
||||
## Valid Named Fragments␊
|
||||
␊
|
||||
[Valid](#named-fragment)␊
|
||||
␊
|
||||
[Valid](#valid-heading-with-named-fragment-named-fragment)␊
|
||||
␊
|
||||
[Valid](#another_fragment_123)␊
|
||||
␊
|
||||
[Valid](#valid-heading-with-another-named-fragment-another_fragment_123)␊
|
||||
␊
|
||||
[Valid](#closed-atx)␊
|
||||
␊
|
||||
[Valid](#setext)␊
|
||||
␊
|
||||
### Valid Heading with Named Fragment {#named-fragment}␊
|
||||
␊
|
||||
### Valid Heading with Another Named Fragment {#another_fragment_123}␊
|
||||
␊
|
||||
### Valid Closed ATX Heading with Named Fragment {#closed-atx} ###␊
|
||||
␊
|
||||
Valid Setext Heading with Named Fragment {#setext}␊
|
||||
--------------------------------------------------␊
|
||||
␊
|
||||
## Invalid Named Fragments␊
|
||||
␊
|
||||
### Invalid Heading with Named Fragment {#embedded space}␊
|
||||
␊
|
||||
### Invalid Heading with Named Fragment {#hyphen--run}␊
|
||||
␊
|
||||
### Invalid Heading with Named Fragment {#UpperCase}␊
|
||||
␊
|
||||
{#named-fragment-outside-heading}␊
|
||||
␊
|
||||
[Invalid](#embedded-space) {MD051}␊
|
||||
␊
|
||||
[Invalid](#embedded_space) {MD051}␊
|
||||
␊
|
||||
[Invalid](#embedded) {MD051}␊
|
||||
␊
|
||||
[Invalid](#hyphen--run) {MD051}␊
|
||||
␊
|
||||
[Invalid](#hyphen-run) {MD051}␊
|
||||
␊
|
||||
[Invalid](#named-fragment-outside-heading) {MD051}␊
|
||||
␊
|
||||
[Invalid](#UpperCase) {MD051}␊
|
||||
␊
|
||||
[Invalid](#uppercase) {MD051}␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"emphasis-style": false,␊
|
||||
"heading-style": false,␊
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue