mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Update MD043/required-headings to add match_case parameter (fixes #613).
This commit is contained in:
parent
592a42b0cb
commit
37f74ee958
13 changed files with 125 additions and 6 deletions
12
test/required-headings-match-case.json
Normal file
12
test/required-headings-match-case.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"MD043": {
|
||||
"headings": [
|
||||
"# Title",
|
||||
"## First Heading",
|
||||
"## Second Heading",
|
||||
"*",
|
||||
"## Third Heading"
|
||||
],
|
||||
"match_case": true
|
||||
}
|
||||
}
|
||||
9
test/required-headings-match-case.md
Normal file
9
test/required-headings-match-case.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Title
|
||||
|
||||
## First Heading
|
||||
|
||||
## Second Heading
|
||||
|
||||
### Random heading
|
||||
|
||||
## Third Heading
|
||||
12
test/required-headings-wrong-match-case.json
Normal file
12
test/required-headings-wrong-match-case.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"MD043": {
|
||||
"headings": [
|
||||
"# Title",
|
||||
"## First Heading",
|
||||
"## Second Heading",
|
||||
"*",
|
||||
"## Third Heading"
|
||||
],
|
||||
"match_case": true
|
||||
}
|
||||
}
|
||||
11
test/required-headings-wrong-match-case.md
Normal file
11
test/required-headings-wrong-match-case.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Title
|
||||
|
||||
## First Heading
|
||||
|
||||
## SECOND HEADING
|
||||
|
||||
{MD043:5}
|
||||
|
||||
### Random heading
|
||||
|
||||
## Third Heading
|
||||
|
|
@ -34838,6 +34838,24 @@ Generated by [AVA](https://avajs.dev).
|
|||
`,
|
||||
}
|
||||
|
||||
## required-headings-match-case.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [],
|
||||
fixed: `# Title␊
|
||||
␊
|
||||
## First Heading␊
|
||||
␊
|
||||
## Second Heading␊
|
||||
␊
|
||||
### Random heading␊
|
||||
␊
|
||||
## Third Heading␊
|
||||
`,
|
||||
}
|
||||
|
||||
## required-headings-missing-first.md
|
||||
|
||||
> Snapshot 1
|
||||
|
|
@ -35216,6 +35234,41 @@ Generated by [AVA](https://avajs.dev).
|
|||
`,
|
||||
}
|
||||
|
||||
## required-headings-wrong-match-case.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: ## Second Heading; Actual: ## SECOND HEADING',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 5,
|
||||
ruleDescription: 'Required heading structure',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md043',
|
||||
ruleNames: [
|
||||
'MD043',
|
||||
'required-headings',
|
||||
'required-headers',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Title␊
|
||||
␊
|
||||
## First Heading␊
|
||||
␊
|
||||
## SECOND HEADING␊
|
||||
␊
|
||||
{MD043:5}␊
|
||||
␊
|
||||
### Random heading␊
|
||||
␊
|
||||
## Third Heading␊
|
||||
`,
|
||||
}
|
||||
|
||||
## required-headings-zero-or-more-last.md
|
||||
|
||||
> Snapshot 1
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue