Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 2.17 KB

File metadata and controls

97 lines (64 loc) · 2.17 KB

MD050 - Strong style

Aliases: strong-style
Tags: emphasis
Fixable: Some violations can be fixed by tooling

Rule Description

This rule is triggered when the symbols used in the document for strong text do not match the configured strong style:

**Text**
__Text__

To fix this issue, use the configured strong style throughout the document:

**Text**
**Text**

The configured strong style can be a specific symbol to use (asterisk, underscore) or can require all strong text matches the first strong text (consistent).

Note: Strong emphasis within a word is restricted to asterisk in order to avoid unwanted emphasis for words containing internal underscores like__this__one.

Configuration

  • style: Strong style (string, default consistent, values asterisk / consistent / underscore)

Example Configuration

[linters.settings.strong-style]
style = "asterisk"

Examples

Valid (consistent mode)

This paragraph uses **consistent** asterisk strong throughout the **entire** document.
This paragraph uses __consistent__ underscore strong throughout the __entire__ document.

Invalid (consistent mode)

This paragraph **uses** both __kinds__ of strong marker.

Valid (asterisk mode)

This paragraph uses **only** asterisk strong **throughout**.

Invalid (asterisk mode)

This paragraph uses **asterisk** and __underscore__ strong.

Valid (underscore mode)

This paragraph uses __only__ underscore strong __throughout__.

Invalid (underscore mode)

This paragraph uses __underscore__ and **asterisk** strong.

Special Cases

Strong emphasis (triple markers) follows the same consistency rules:

This has ***strong emphasis*** and ***more strong emphasis*** (consistent).
This has ***strong emphasis*** and ___strong emphasis___ (inconsistent).

Strong text in code contexts is ignored:

This has `**strong in code**` and **actual strong** (only actual strong is checked).

Rationale

Consistent formatting makes it easier to understand a document.