markdownlint/doc/md003.md

51 lines
1.1 KiB
Markdown
Raw Normal View History

# `MD003` - Heading style
Tags: `headers`, `headings`
Aliases: `header-style`, `heading-style`
Parameters:
* `style`: Heading style (`string`, default `consistent`, values `atx` /
`atx_closed` / `consistent` / `setext` / `setext_with_atx` /
`setext_with_atx_closed`)
This rule is triggered when different heading styles (atx, setext, and 'closed'
atx) are used in the same document:
```markdown
# ATX style H1
## Closed ATX style H2 ##
Setext style H1
===============
```
Be consistent with the style of heading used in a document:
```markdown
# ATX style H1
## ATX style H2
```
The setext_with_atx and setext_with_atx_closed doc styles allow atx-style
headings of level 3 or more in documents with setext style headings:
```markdown
Setext style H1
===============
Setext style H2
---------------
### ATX style H3
```
Note: the configured heading style can be a specific style to use (atx,
atx_closed, setext, setext_with_atx, setext_with_atx_closed), or simply require
that the usage is consistent within the document.
Rationale: Consistent formatting makes it easier to understand a document.