mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-06 16:08:49 +01:00
Update MD007/ul-indent to account for 4-space base indent within footnote definitions (fixes #1679).
This commit is contained in:
parent
55700da8a2
commit
442afe4466
5 changed files with 129 additions and 1 deletions
22
test/lists-inside-footnote.md
Normal file
22
test/lists-inside-footnote.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Lists Inside Footnote
|
||||
|
||||
Text.[^ref]
|
||||
|
||||
[^ref]: Note and list:
|
||||
|
||||
* Item
|
||||
* Item
|
||||
* Item
|
||||
|
||||
1. Item
|
||||
1. Item
|
||||
1. Item
|
||||
|
||||
Text
|
||||
|
||||
* Item
|
||||
* Item {MD005} {MD007}
|
||||
* Item
|
||||
* Item
|
||||
* Item {MD005} {MD007}
|
||||
* Item
|
||||
|
|
@ -37588,6 +37588,110 @@ Generated by [AVA](https://avajs.dev).
|
|||
`,
|
||||
}
|
||||
|
||||
## lists-inside-footnote.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: 4; Actual: 5',
|
||||
errorRange: [
|
||||
1,
|
||||
7,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 18,
|
||||
ruleDescription: 'Inconsistent indentation for list items at the same level',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md005.md',
|
||||
ruleNames: [
|
||||
'MD005',
|
||||
'list-indent',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: 6; Actual: 7',
|
||||
errorRange: [
|
||||
1,
|
||||
9,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 21,
|
||||
ruleDescription: 'Inconsistent indentation for list items at the same level',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md005.md',
|
||||
ruleNames: [
|
||||
'MD005',
|
||||
'list-indent',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: 4; Actual: 5',
|
||||
errorRange: [
|
||||
1,
|
||||
7,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 1,
|
||||
insertText: '',
|
||||
},
|
||||
lineNumber: 18,
|
||||
ruleDescription: 'Unordered list indentation',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md007.md',
|
||||
ruleNames: [
|
||||
'MD007',
|
||||
'ul-indent',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: 6; Actual: 7',
|
||||
errorRange: [
|
||||
1,
|
||||
9,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 1,
|
||||
insertText: '',
|
||||
},
|
||||
lineNumber: 21,
|
||||
ruleDescription: 'Unordered list indentation',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md007.md',
|
||||
ruleNames: [
|
||||
'MD007',
|
||||
'ul-indent',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Lists Inside Footnote␊
|
||||
␊
|
||||
Text.[^ref]␊
|
||||
␊
|
||||
[^ref]: Note and list:␊
|
||||
␊
|
||||
* Item␊
|
||||
* Item␊
|
||||
* Item␊
|
||||
␊
|
||||
1. Item␊
|
||||
1. Item␊
|
||||
1. Item␊
|
||||
␊
|
||||
Text␊
|
||||
␊
|
||||
* Item␊
|
||||
* Item {MD005} {MD007}␊
|
||||
* Item␊
|
||||
* Item␊
|
||||
* Item {MD005} {MD007}␊
|
||||
* Item␊
|
||||
`,
|
||||
}
|
||||
|
||||
## lists-on-a-line.md
|
||||
|
||||
> Snapshot 1
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue