2022-10-30 15:13:19 -07:00
|
|
|
# `MD032` - Lists should be surrounded by blank lines
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Tags: `blank_lines`, `bullet`, `ol`, `ul`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Aliases: `blanks-around-lists`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
|
|
|
|
Fixable: Most violations can be fixed by tooling
|
|
|
|
|
|
|
|
|
|
This rule is triggered when lists (of any kind) are either not preceded or not
|
|
|
|
|
followed by a blank line:
|
|
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
Some text
|
|
|
|
|
* Some
|
|
|
|
|
* List
|
|
|
|
|
|
|
|
|
|
1. Some
|
|
|
|
|
2. List
|
|
|
|
|
Some text
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To fix this, ensure that all lists have a blank line both before and after
|
|
|
|
|
(except where the block is at the beginning or end of the document):
|
|
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
Some text
|
|
|
|
|
|
|
|
|
|
* Some
|
|
|
|
|
* List
|
|
|
|
|
|
|
|
|
|
1. Some
|
|
|
|
|
2. List
|
|
|
|
|
|
|
|
|
|
Some text
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will
|
|
|
|
|
not parse lists that don't have blank lines before and after them.
|