1.4 KiB
This rule is triggered when list items are not indented by the configured number of spaces (default: 2).
Example:
* List item
* Nested list item indented by 3 spaces
Corrected Example:
* List item
* Nested list item indented by 2 spaces
Note: This rule applies to a sublist only if its parent lists are all also unordered (otherwise, extra indentation of ordered lists interferes with the rule).
The start_indented
parameter allows the first level of lists to be indented by
the configured number of spaces rather than starting at zero (the inverse of
MD006). The start_indent
parameter allows the first level of lists to be
indented by a different number of spaces than the rest (ignored when
start_indented
is not set).
Rationale: Indenting by 2 spaces allows the content of a nested list to be in line with the start of the content of the parent list when a single space is used after the list marker. Indenting by 4 spaces is consistent with code blocks and simpler for editors to implement. Additionally, this can be a compatibility issue for other Markdown parsers, which require 4-space indents. More information: Markdown Style Guide.
Note: See Prettier.md for compatibility information.