MD055 - Table Pipe Style
Table pipe style should be consistent.
Why This Rule Exists
Markdown tables can have leading and trailing pipes or omit them. Consistent style improves readability and source formatting.
Styles
Leading and Trailing (Recommended)
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
No Leading/Trailing
Header 1 | Header 2
---------|----------
Cell 1 | Cell 2
Leading Only
| Header 1 | Header 2
|----------|----------
| Cell 1 | Cell 2
Examples
Incorrect (Mixed)
| Header 1 | Header 2 |
|----------|----------|
Cell 1 | Cell 2
Correct
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
Configuration
[MD055]
style = "leading_and_trailing" # Options: see below
| Value | Description |
|---|---|
leading_and_trailing | Pipes on both ends |
leading_only | Only leading pipes |
trailing_only | Only trailing pipes |
no_leading_or_trailing | No outer pipes |
consistent | Match first table's style |
When to Disable
- Documents with tables from different sources
- Content where specific formatting is required
Rule Details
- Rule ID: MD055
- Aliases: table-pipe-style
- Category: Formatting
- Severity: Warning
- Auto-fix: Yes