Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MD049 - Emphasis Style

Emphasis style should be consistent.

Why This Rule Exists

Markdown supports two emphasis markers: asterisks and underscores. Consistent style improves readability and maintainability.

Styles

Asterisks

This is *italic* text.

Underscores

This is _italic_ text.

Examples

Incorrect (Mixed)

This is *italic* and this is _also italic_.

Use *consistent* formatting _throughout_ the document.

Correct

This is *italic* and this is *also italic*.

Use *consistent* formatting *throughout* the document.

Configuration

[MD049]
style = "asterisk"  # Options: "asterisk", "underscore", "consistent"
ValueDescription
asteriskUse *text*
underscoreUse _text_
consistentMatch first occurrence

When to Disable

  • Documents with intentional style variation
  • Content imported from multiple sources

Rule Details

  • Rule ID: MD049
  • Aliases: emphasis-style
  • Category: Formatting
  • Severity: Warning
  • Auto-fix: Yes

Note on Underscores

Underscores inside words are not treated as emphasis:

some_variable_name  <!-- Not italic, just text -->
  • MD037 - Spaces inside emphasis
  • MD050 - Strong style