MD026 - Keep headings clean and professional¶
Aliases: no-trailing-punctuation
What this rule does¶
Removes trailing punctuation from the end of headings to maintain a clean, professional appearance. Question marks are allowed by default for FAQ-style headings.
Why this matters¶
- Professional appearance: Clean headings look more polished and professional
- Better readability: Unnecessary punctuation can distract readers
- Consistent style: Maintains a uniform look throughout your document
- Navigation clarity: Clean headings work better in tables of contents and outlines
Examples¶
✅ Correct¶
# Introduction
## What is Markdown?
### FAQ: Frequently Asked Questions
#### Step 1: Getting Started
##### Chapter 2: Configuration
❌ Incorrect¶
# This is a sentence.
## Random heading;
### This seems wrong,
#### Important!
##### Ending with colon:
🔧 Fixed¶
Configuration¶
To allow exclamation marks in headings, remove ! from the list:
Automatic fixes¶
This rule will:
- Remove periods, commas, semicolons, colons, and exclamation marks from heading endings (default:
.,;:!) - Preserve question marks for FAQ-style headings ("What is Markdown?")
- You can customize the punctuation list if you want to allow certain characters