MD026 - no-trailing-punctuation¶
Description¶
This rule checks that headings do not end with punctuation characters. By default, it flags periods, commas, semicolons, colons, and exclamation marks. Question marks are allowed by default since they are common in FAQ-style headings.
Rationale¶
Headings are not meant to be full sentences. Trailing punctuation in headings is unnecessary and inconsistent with most style guides.
Configuration¶
punctuation-
Characters considered as trailing punctuation.
- Default:
.,;:!
- Default:
Examples¶
Invalid¶
# Heading with period.
## Heading with colon:
### Heading with semicolon;
This document has headings with trailing punctuation.
Valid¶
# Heading without punctuation
## Another clean heading
### Question marks are allowed?
This document has proper headings.