Add note about blocks and list indentation to MD029/ol-prefix.

This commit is contained in:
David Anson 2020-03-05 11:41:59 -08:00 committed by GitHub
parent d171b6c6b7
commit 0f73f06232
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -992,6 +992,30 @@ This rule supports 0-prefixing ordered list items for uniform indentation:
... ...
``` ```
Note: This rule will report violations for cases like the following where an improperly-indented code block (or similar) appears between two list items and "breaks" the list in two:
~~~markdown
1. First list
```text
Code block
```
1. Second list
~~~
The fix is to indent the code block so it becomes part of the preceding list item as intended:
~~~markdown
1. First list
```text
Code block
```
2. Still first list
~~~
Rationale: Consistent formatting makes it easier to understand a document. Rationale: Consistent formatting makes it easier to understand a document.
<a name="md030"></a> <a name="md030"></a>