MD007 - Unordered List Indentation
Unordered list indentation should use consistent spacing.
Why This Rule Exists
Proper indentation of nested lists ensures correct rendering and improves readability. Different Markdown parsers may interpret inconsistent indentation differently.
Examples
Incorrect (4-space indent when 2 expected)
- Item one
- Nested too far
- Item two
Correct (2-space indent)
- Item one
- Properly nested
- Another nested item
- Item two
Correct (4-space indent with configuration)
- Item one
- Nested with 4 spaces
- Another nested item
- Item two
Configuration
[MD007]
indent = 2 # Spaces per indentation level (default: 2)
start_indented = false # Allow first level to be indented
| Option | Default | Description |
|---|---|---|
indent | 2 | Number of spaces per nesting level |
start_indented | false | Allow top-level items to be indented |
When to Disable
- Documents following a different indentation standard
- Content imported from tools using different conventions
Rule Details
- Rule ID: MD007
- Aliases: ul-indent
- Category: Formatting
- Severity: Warning
- Auto-fix: Yes