Skip to content

Rule - MD035#

Property Value
Aliases md035, hr-style
Autofix Available Yes
Enabled By Default Yes

Summary#

Horizontal rule style.

Reasoning#

Readability#

The primary reason for enabling this rule is to force the document author to use a single representation for a horizontal rule to enhance readability.

Examples#

Failure Scenarios#

This rule triggers if the horizontal rule marker style is not consistent throughout the document. Note that with default configuration, the first marker sets the style used throughout the document.

```Markdown#




```

If the configuration specifies a specific style that is not present in the document, such as * * *, then this rule will trigger on every marker that is not that specific style.

Correct Scenarios#

This rule does not trigger if every horizontal rule marker is the same throughout the document:

```Markdown#


```

Note that any leading whitespace is discarded before the comparison is made, so that the following example will not trigger this rule:

```Markdown#


```

Fix Description#

All thematic breaks are replaced with the configured thematic break text. If the configuration is the default consistent, then the first thematic break in the document sets the thematic break text used throughout the document.

Configuration#

Prefixes
plugins.md035.
plugins.hr-style.
Value Name Type Default Description
enabled boolean True Whether the Rule Plugin is enabled.
style string consistent consistent for consistent, or a specific marker**

** If a specific marker is configured, it must be valid multiples (three or more) of either the - character, the _ character, or the * character, with optional whitespace between them. The value cannot start or end with a space character.

Origination of Rule#

This rule is largely inspired by the MarkdownLint rule MD035.