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

MD037 - Spaces Inside Emphasis

Spaces inside emphasis markers.

Why This Rule Exists

Spaces immediately inside emphasis markers may prevent proper rendering in some Markdown parsers. The emphasis won't be applied, leaving literal asterisks or underscores in the output.

Examples

Incorrect

This is **bold** text.


This is *italic* text.


Here is __also bold__ text.

Correct

This is **bold** text.

This is *italic* text.

Here is __also bold__ text.

Configuration

This rule has no configuration options.

When to Disable

  • Generally should not be disabled as spaced emphasis rarely renders correctly

Rule Details

  • Rule ID: MD037
  • Aliases: no-space-in-emphasis
  • Category: Emphasis
  • Severity: Warning
  • Auto-fix: Yes (removes spaces inside markers)
  • MD038 - Spaces inside code spans
  • MD039 - Spaces inside link text
  • MD049 - Emphasis style
  • MD050 - Strong style