Skip to content

MD030 - Add consistent spacing after list markers

Aliases: list-marker-space

What this rule does

Ensures consistent spacing between list markers (bullets or numbers) and the text that follows them.

Why this matters

  • Visual consistency: Uniform spacing makes lists easier to scan
  • Proper rendering: Some parsers require specific spacing to recognize lists
  • Professional appearance: Consistent formatting looks more polished
  • Readability: Proper spacing prevents list items from looking cramped

Examples

✅ Correct

* Unordered list item with one space
* Another item

1. Ordered list item with one space
2. Another item

❌ Incorrect

*  Unordered list item with two spaces
*   Another item with three spaces

1.  Ordered list item with two spaces
2.   Another item with three spaces

🔧 Fixed

* Unordered list item with one space
* Another item with one space

1. Ordered list item with one space
2. Another item with one space

Configuration

[MD030]
ul-single = 1  # Spaces after bullet for single-line items (default: 1)
ol-single = 1  # Spaces after number for single-line items (default: 1)
ul-multi = 1  # Spaces after bullet for multi-line items (default: 1)
ol-multi = 1  # Spaces after number for multi-line items (default: 1)

Automatic fixes

This rule will:

  • Adjust spacing after list markers to match your configuration
  • Preserve list item content and structure
  • Handle single-line and multi-line items according to their specific settings

Learn more