Add style "zero" to MD029/ol-prefix (fixes #140).

This commit is contained in:
David Anson 2019-03-06 21:57:19 -08:00
parent 2ccacf03f5
commit ed295cd947
11 changed files with 189 additions and 8 deletions

View file

@ -863,11 +863,12 @@ Tags: ol
Aliases: ol-prefix
Parameters: style ("one", "ordered", "one_or_ordered"; default "one_or_ordered")
Parameters: style ("one", "ordered", "one_or_ordered", "zero"; default "one_or_ordered")
This rule is triggered on ordered lists that do not either start with '1.' or
This rule is triggered for ordered lists that do not either start with '1.' or
do not have a prefix that increases in numerical order (depending on the
configured style).
configured style). The less-common pattern of using '0.' for all prefixes is
also supported.
Example valid list if the style is configured as 'one':
@ -887,6 +888,14 @@ Example valid list if the style is configured as 'ordered':
Both examples are valid when the style is configured as 'one_or_ordered'.
Example valid list if the style is configured as 'zero':
```markdown
0. Do this.
0. Do that.
0. Done.
```
Example invalid list for all styles:
```markdown