MD026 - No Trailing Punctuation
Trailing punctuation in headings.
Why This Rule Exists
Headings typically don't end with punctuation like periods or commas. Trailing punctuation can look awkward in tables of contents and navigation menus.
Examples
Incorrect
# Welcome to the Guide.
## Getting Started:
### What is Markdown?
Correct
# Welcome to the Guide
## Getting Started
### What is Markdown
Questions (Configurable)
## Frequently Asked Questions
### How do I install it?
Configuration
[MD026]
punctuation = ".,;:!?" # Characters to flag (default: ".,;:!")
The ? is excluded by default to allow question headings in FAQ sections.
When to Disable
- Documents with headings that are complete sentences
- Stylistic choice to include punctuation
- FAQ sections with question marks (or adjust
punctuationconfig)
Rule Details
- Rule ID: MD026
- Aliases: no-trailing-punctuation
- Category: Formatting
- Severity: Warning
- Auto-fix: Yes (removes trailing punctuation)