2022-10-30 15:13:19 -07:00
|
|
|
# `MD037` - Spaces inside emphasis markers
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Tags: `emphasis`, `whitespace`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Aliases: `no-space-in-emphasis`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-12-16 13:53:03 -08:00
|
|
|
Fixable: Some violations can be fixed by tooling
|
2022-10-29 23:21:45 -07:00
|
|
|
|
|
|
|
This rule is triggered when emphasis markers (bold, italic) are used, but they
|
|
|
|
have spaces between the markers and the text:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
Here is some ** bold ** text.
|
|
|
|
|
|
|
|
Here is some * italic * text.
|
|
|
|
|
|
|
|
Here is some more __ bold __ text.
|
|
|
|
|
|
|
|
Here is some more _ italic _ text.
|
|
|
|
```
|
|
|
|
|
|
|
|
To fix this, remove the spaces around the emphasis markers:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
Here is some **bold** text.
|
|
|
|
|
|
|
|
Here is some *italic* text.
|
|
|
|
|
|
|
|
Here is some more __bold__ text.
|
|
|
|
|
|
|
|
Here is some more _italic_ text.
|
|
|
|
```
|
|
|
|
|
|
|
|
Rationale: Emphasis is only parsed as such when the asterisks/underscores
|
|
|
|
aren't surrounded by spaces. This rule attempts to detect where
|
|
|
|
they were surrounded by spaces, but it appears that emphasized text was
|
|
|
|
intended by the author.
|