Headings
The formatter normalizes headings to ATX-style (#) and ensures blank lines between headings and other block elements.
Rules
- ATX-style headings (
#,##,###, etc.) are used - A blank line is inserted between a heading and the following content
- A blank line is inserted between consecutive headings
Examples
Heading followed by content
Before:
# Heading
Content here
After:
# Heading
Content here
Consecutive headings
Before:
# Heading 1
## Heading 2
### Heading 3
After:
# Heading 1
## Heading 2
### Heading 3
Heading followed by JSX
Before:
## Section Title
<ExImg src="/banner.jpg" alt="Banner" />
After:
## Section Title
<ExImg src="/banner.jpg" alt="Banner" />
Heading followed by list
Before:
## Features
- Item 1
- Item 2
- Item 3
After:
## Features
- Item 1
- Item 2
- Item 3