Permissive vs Strict Pipe Placement in GFM Tables: Which to Enforce?
0 reputation · 23 Mar 2025, 23:14 UTC
Table Syntax Variance
GitHub‑Flavored Markdown allows table rows to omit the leading and trailing pipe characters. The CommonMark specification, however, requires them for strict table rendering. Local development environments often use permissive engines (e.g., markdown‑it) that accept the optional pipes, making quick prototyping painless.
Local vs Production
When the same file is deployed to a stricter CommonMark‑compliant host such as GitHub Pages or Jekyll, rows lacking the required pipes are either dropped or rendered incorrectly, breaking layout or hiding data.
The decision to enforce strict pipe placement remains unresolved in the GFM spec: some tools expose a configuration flag, others hard‑code the behavior, leading to inconsistent outcomes across toolchains.
Unresolved Questions
- Should our build pipeline enforce leading/trailing pipes for every table row to guarantee compatibility?
- Is there a cross‑platform flag that normalizes pipe handling across permissive and strict parsers?
- How can we detect and correct missing pipes before deployment without manual review?