Skip to content

MD035 - hr-style

Description

This rule enforces consistent horizontal rule styles throughout a document. It triggers when different horizontal rule formats are used, such as mixing --- with ***. Rules with different lengths (e.g., --- vs ----) or different characters (e.g., --- vs ___) are also considered different styles.

Rationale

Consistent formatting makes it easier to understand a document. Using the same horizontal rule style throughout improves maintainability.

Configuration

style

Required horizontal rule style. Use consistent to enforce that all horizontal rules match the first one, or specify an exact style like ---, ***, - - -, etc.

  • Default: consistent

Examples

Invalid

# Document with inconsistent horizontal rules

Some text here.

---

More text here.

***

Final section.

Valid

# Document with consistent horizontal rules

Some text here.

---

More text here.

---

Final section.