Skip to content

MD035 - Keep line breaks consistent

Aliases: hr-style

What this rule does

Ensures all horizontal line breaks (dividers) use the same style throughout your document.

Why this matters

  • Visual consistency: Mixed styles (---, *, ___) look unprofessional
  • Clear document structure: Consistent dividers make sections easier to identify
  • Reduces confusion: One style means less to remember when editing
  • Better readability: Readers know what to expect for section breaks

Examples

✅ Correct

All dividers use the same style:

Chapter 1 content here.

---

Chapter 2 content here.

---

Chapter 3 content here.

❌ Incorrect

Different divider styles mixed together:

Chapter 1 content here.

***

Chapter 2 content here.

___

Chapter 3 content here.

🔧 Fixed

All dividers now use the same style:

Chapter 1 content here.

---

Chapter 2 content here.

---

Chapter 3 content here.

Configuration

[MD035]
style = "---"  # Choose your preferred style

Style options

  • "---" Three hyphens (default)
  • "***" Three asterisks
  • "___" Three underscores
  • "- - -" Spaced hyphens
  • "* * *" Spaced asterisks

Automatic fixes

This rule will convert all horizontal dividers to match your configured style, preserving any spacing patterns.

Learn more