Add MD030 with tests, refactor list handling with flattenLists.

This commit is contained in:
David Anson 2015-03-10 23:10:06 -07:00
parent b21548a992
commit 2b289ab5f3
4 changed files with 177 additions and 56 deletions

View file

@ -0,0 +1,10 @@
{
"default": true,
"MD007": {
"indent": 4
},
"MD030": {
"ul_multi": 3,
"ol_multi": 2
}
}

View file

@ -0,0 +1,74 @@
Normal list
* Foo
* Bar
* Baz
List with incorrect spacing
* Foo {MD030}
* Bar {MD030}
* Baz {MD030}
List with children:
* Foo {MD030}
* Bar {MD030}
* Baz
List with children and correct spacing:
* Foo
* Bar
* Baz (This sublist has no children)
List with Multiple paragraphs and correct spacing
* Foo
Here is the second paragraph
* All items in the list need the same indent
List with multiple paragraphs and incorrect spacing
* Foo {MD030}
Here is the second paragraph
* Bar {MD030}
List with code blocks:
* Foo
Here is some code
* Bar
Ordered lists:
1. Foo
1. Bar
1. Baz
And with incorrect spacing:
1. Foo {MD030}
1. Bar {MD030}
1. Baz {MD030}
Ordered lists with children:
1. Foo {MD030}
* Hi
1. Bar {MD030}
1. Baz {MD030}
Ordered lists with children (correct spacing), and with something other than
the first item determining that the entire list has children:
1. Foo
1. Bar
* Hi
1. Baz