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

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

| 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
ValueDescription
leading_and_trailingPipes on both ends
leading_onlyOnly leading pipes
trailing_onlyOnly trailing pipes
no_leading_or_trailingNo outer pipes
consistentMatch 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
  • MD056 - Table column count
  • MD058 - Blanks around tables