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:
❌ Incorrect¶
Different divider styles mixed together:
🔧 Fixed¶
The odd divider is rewritten to match the style the document already uses:
Configuration¶
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¶
Related rules¶
- MD003 - Heading style - Keep heading formats consistent
- MD012 - Multiple consecutive blank lines - Control spacing between sections
- MD022 - Headings should be surrounded by blank lines - Ensure proper spacing around headings