Skip to content

MD049 - emphasis-style

Description

This rule ensures that emphasis markers (for italic text) throughout a document follow a consistent style. It validates that emphasis uses matching symbols (asterisks or underscores) according to the configured preference.

Rationale

Consistent formatting makes it easier to understand a document. Uniform emphasis styling promotes readability.

Configuration

style

Required emphasis style.

  • Default: consistent
  • Options:
    • consistent: All emphasis markers must match the first one used
    • asterisk: All emphasis markers must be *
    • underscore: All emphasis markers must be _

Examples

Invalid

# Inconsistent Emphasis Style

This text has *italic* with asterisks.

But this uses _italic_ with underscores.

Valid

# Consistent Emphasis Style

This text has *italic* words using asterisks.

Here is *more italic* text that is consistent.

Multiple *words* in *a* sentence are *fine*.