markdownlint/doc/md060.md
David Anson 4447540366
Some checks are pending
Checkers / linkcheck (push) Waiting to run
Checkers / spellcheck (push) Waiting to run
CI / build (20, macos-latest) (push) Waiting to run
CI / build (20, ubuntu-latest) (push) Waiting to run
CI / build (20, windows-latest) (push) Waiting to run
CI / build (22, macos-latest) (push) Waiting to run
CI / build (22, ubuntu-latest) (push) Waiting to run
CI / build (22, windows-latest) (push) Waiting to run
CI / build (24, macos-latest) (push) Waiting to run
CI / build (24, ubuntu-latest) (push) Waiting to run
CI / build (24, windows-latest) (push) Waiting to run
CI / pnpm (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
TestRepos / build (latest, ubuntu-latest) (push) Waiting to run
UpdateTestRepos / update (push) Waiting to run
wip
2025-11-23 17:36:21 -08:00

1.9 KiB

MD060 - Table column style

Tags: table

Aliases: table-column-style

Parameters:

  • style: Table column style (string, default any, values aligned / any / compact / tight)
  • wide_character: RegExp for matching wide character(s) (string, default TBD)

This rule is triggered when the column separators of a GitHub Flavored Markdown table are used inconsistently.

This rule recognizes three table column styles based on popular use:

Style aligned looks the most like a table:

| Character | Meaning |
| --------- | ------- |
| Y         | Yes     |
| N         | No      |

Style compact uses a single space to pad cell content:

| Character | Meaning |
| --- | --- |
| Y | Yes |
| N | No |

Style tight uses no padding for cell content:

|Character|Meaning|
|---|---|
|Y|Yes|
|N|No|

When this rule's style parameter is set to aligned, compact, or tight, every table must match the corresponding pattern and errors will be reported for any violations. By default, or when the any style is used, each table is analyzed to see if it satisfies any supported style. If so, no errors are reported. If not, errors are be reported for whichever style would produce the fewest errors (i.e., whichever style is the closest match).

Note: Pipe alignment for the aligned style is based on ... The following table is correctly aligned based on character count, though some editors render the emoji wider:

| Response | Emoji |
| -------- | ----- |
| Yes      | ✅    |
| No       | ❎    |

Rationale: Consistent formatting makes it easier to understand a document.