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"
| Value | Description |
|---|---|
asterisk | Use *text* |
underscore | Use _text_ |
consistent | Match 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 -->