Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MD005 - List Item Indentation

List item indentation should be consistent within a list.

Why This Rule Exists

Inconsistent indentation within lists can cause rendering issues and makes documents harder to read in source form. Proper indentation also ensures nested lists render correctly.

Examples

Incorrect

- Item one
 - Item two (wrong indentation)
- Item three

Correct

- Item one
- Item two
- Item three

Nested Lists (Correct)

- Item one
  - Nested item
  - Another nested
- Item two

Configuration

This rule has no configuration options. It enforces consistent indentation within each list.

When to Disable

  • Working with auto-generated content that has intentional spacing
  • Documents with complex nested structures requiring manual control

Rule Details

  • Rule ID: MD005
  • Aliases: list-indent
  • Category: Formatting
  • Severity: Warning
  • Auto-fix: Yes
  • MD004 - Unordered list style
  • MD006 - Lists start at beginning of line
  • MD007 - Unordered list indentation depth
  • MD030 - Spaces after list markers