Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 punctuation config)

Rule Details

  • Rule ID: MD026
  • Aliases: no-trailing-punctuation
  • Category: Formatting
  • Severity: Warning
  • Auto-fix: Yes (removes trailing punctuation)
  • MD018 - Space after hash
  • MD021 - Spaces in closed ATX headings