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

The odd divider is rewritten to match the style the document already uses:

Chapter 1 content here.

---

Chapter 2 content here.

---

Chapter 3 content here.

Configuration

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

Style options

  • "consistent" (default) Adopt whichever style the document already uses most (ties go to the one appearing first), and report the dividers that differ from it. No style is imposed, so a document written entirely in *** is accepted as-is.
  • "---" Three hyphens
  • "***" Three asterisks
  • "___" Three underscores
  • "- - -" Spaced hyphens
  • "* * *" Spaced asterisks

Naming a concrete style turns the rule into "every divider must use this marker", which reports dividers that a "consistent" run leaves alone.

Automatic fixes

This rule will convert all horizontal dividers to match your configured style, preserving any spacing patterns. With the default "consistent", the target is the style the document already uses most, so the minority dividers are the ones rewritten.

Learn more