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

MD029 - Ordered List Prefix

Ordered list item prefix consistency.

Why This Rule Exists

Markdown supports different numbering styles for ordered lists. Consistent style improves readability and makes reordering items easier.

Styles

One-Based (All 1s)

1. First item
1. Second item
1. Third item

Advantage: Easy to reorder without renumbering.

Sequential (Ordered)

1. First item
2. Second item
3. Third item

Advantage: Source reflects rendered numbers.

Zero-Based

0. First item
0. Second item
0. Third item

Examples

Incorrect (Mixed)

1. First item
2. Second item
1. Third item

Correct

1. First item
2. Second item
3. Third item

Configuration

[MD029]
style = "one_or_ordered"  # Options: "one", "ordered", "zero", "one_or_ordered"
ValueDescription
oneAll items use 1.
orderedSequential numbering (1, 2, 3...)
zeroAll items use 0.
one_or_orderedAllow either 1. or sequential

When to Disable

  • Documents with intentional mixed numbering
  • Content using numbers for reference purposes

Rule Details

  • Rule ID: MD029
  • Aliases: ol-prefix
  • Category: Formatting
  • Severity: Warning
  • Auto-fix: Yes
  • MD004 - Unordered list style
  • MD030 - Spaces after list markers