mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-02-25 22:34:07 +01:00
Update MD001/heading-increment to support front matter title as the first heading of the page.
This commit is contained in:
parent
a366f80873
commit
1b6839bff0
21 changed files with 317 additions and 16 deletions
|
|
@ -16178,6 +16178,87 @@ Generated by [AVA](https://avajs.dev).
|
|||
`,
|
||||
}
|
||||
|
||||
## heading_increment-alt_title_level3_bad.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: h2; Actual: h3',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 5,
|
||||
ruleDescription: 'Heading levels should only increment by one level at a time',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md001.md',
|
||||
ruleNames: [
|
||||
'MD001',
|
||||
'heading-increment',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `---␊
|
||||
alternate = heading_increment-alt_title_level3_bad␊
|
||||
---␊
|
||||
␊
|
||||
### level 3 {MD001}␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"heading-increment": {␊
|
||||
"front_matter_title": "^\\\\s*alternate\\\\s*="␊
|
||||
},␊
|
||||
"first-line-heading": {␊
|
||||
"front_matter_title": "^\\\\s*alternate\\\\s*="␊
|
||||
}␊
|
||||
} -->␊
|
||||
`,
|
||||
}
|
||||
|
||||
## heading_increment-title_level2_good.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [],
|
||||
fixed: `---␊
|
||||
title: heading_increment-title_level2_good␊
|
||||
---␊
|
||||
␊
|
||||
## level 2␊
|
||||
␊
|
||||
### level 3␊
|
||||
`,
|
||||
}
|
||||
|
||||
## heading_increment-title_level3_bad.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: h2; Actual: h3',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 5,
|
||||
ruleDescription: 'Heading levels should only increment by one level at a time',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md001.md',
|
||||
ruleNames: [
|
||||
'MD001',
|
||||
'heading-increment',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `---␊
|
||||
title: heading_increment-title_level3_good␊
|
||||
---␊
|
||||
␊
|
||||
### level 3 {MD001}␊
|
||||
`,
|
||||
}
|
||||
|
||||
## heading_multiple_toplevel.md
|
||||
|
||||
> Snapshot 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue