mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-20 16:00:13 +01:00
38 lines
No EOL
1.1 KiB
Markdown
38 lines
No EOL
1.1 KiB
Markdown
# MD007 - Unordered list indentation
|
|
|
|
Tags: bullet, ul, indentation
|
|
|
|
Aliases: ul-indent
|
|
|
|
Parameters: indent (number; default 2)
|
|
|
|
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
|
|
|
|
Rationale (2 space indent): 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.
|
|
|
|
Rationale (4 space indent): Same indent as code blocks, simpler for editors to
|
|
implement. See
|
|
<http://www.cirosantilli.com/markdown-styleguide/#indented-lists> for more
|
|
information.
|
|
|
|
In addition, this is a compatibility issue with multi-markdown parsers, which
|
|
require a 4 space indents. See
|
|
<http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting>
|
|
for a description of the problem.
|
|
|
|
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). |