mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Allow for first level indentation of lists in MD007/ul-indent (fixes #242).
This commit is contained in:
parent
5634b317d6
commit
9aeddedb7d
7 changed files with 81 additions and 3 deletions
8
test/list-indentation-start-indented.json
Normal file
8
test/list-indentation-start-indented.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD006": false,
|
||||
"MD007": {
|
||||
"indent": 3,
|
||||
"start_indented": true
|
||||
}
|
||||
}
|
||||
39
test/list-indentation-start-indented.md
Normal file
39
test/list-indentation-start-indented.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# List Indentation - Start Indented
|
||||
|
||||
* item 1
|
||||
* item 2
|
||||
* item 2.1
|
||||
* item 2.2
|
||||
* item 2.2.1
|
||||
* item 2.3
|
||||
* item 3
|
||||
|
||||
## Disallowed List Indentation - Starts at Zero
|
||||
|
||||
* item 1 {MD007}
|
||||
* item 2 {MD007}
|
||||
* item 2.1 {MD007}
|
||||
* item 2.2 {MD007}
|
||||
* item 2.2.1 {MD007}
|
||||
* item 2.3 {MD007}
|
||||
* item 3 {MD007}
|
||||
|
||||
## Disallowed List Indentation - Starts at One
|
||||
|
||||
* item 1 {MD007}
|
||||
* item 2 {MD007}
|
||||
* item 2.1 {MD007}
|
||||
* item 2.2 {MD007}
|
||||
* item 2.2.1 {MD007}
|
||||
* item 2.3 {MD007}
|
||||
* item 3 {MD007}
|
||||
|
||||
## Disallowed List Indentation - Starts at Two
|
||||
|
||||
* item 1 {MD007}
|
||||
* item 2 {MD007}
|
||||
* item 2.1 {MD007}
|
||||
* item 2.2 {MD007}
|
||||
* item 2.2.1 {MD007}
|
||||
* item 2.3 {MD007}
|
||||
* item 3 {MD007}
|
||||
|
|
@ -44,3 +44,13 @@ Text
|
|||
- Item {MD005}
|
||||
|
||||
Text
|
||||
|
||||
## Invalid Indentation - Should Start at Zero
|
||||
|
||||
- item 1 {MD006} {MD007}
|
||||
- item 2 {MD006} {MD007}
|
||||
- item 2.1 {MD007}
|
||||
- item 2.2 {MD007}
|
||||
- item 2.2.1 {MD007}
|
||||
- item 2.3 {MD007}
|
||||
- item 3 {MD006} {MD007}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue