[PR #1903] [CLOSED] feat: add/remove leading/trailing piples for MD055 errors (fixes #1902). #3636

Closed
opened 2026-03-07 20:14:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DavidAnson/markdownlint/pull/1903
Author: @non-zero-sum
Created: 12/28/2025
Status: Closed

Base: nextHead: next


📝 Commits (1)

  • cbffa81 feat: add/remove leading/trailing piples for MD055 errors (fixes #1902).

📊 Changes

17 files changed (+5818 additions, -709 deletions)

View changed files

📝 doc/Rules.md (+2 -0)
📝 doc/md055.md (+2 -0)
📝 lib/constants.mjs (+1 -1)
📝 lib/md055.mjs (+35 -9)
📝 test/snapshots/markdownlint-test-custom-rules.mjs.snap (+0 -0)
📝 test/snapshots/markdownlint-test-exports.mjs.snap (+0 -0)
📝 test/snapshots/markdownlint-test-micromark.mjs.snap (+0 -0)
📝 test/snapshots/markdownlint-test-scenarios.mjs.md (+5370 -675)
📝 test/snapshots/markdownlint-test-scenarios.mjs.snap (+0 -0)
📝 test/table-pipe-style-explicit-both.md (+51 -3)
📝 test/table-pipe-style-explicit-leading.md (+51 -3)
📝 test/table-pipe-style-explicit-none.md (+51 -3)
📝 test/table-pipe-style-explicit-trailing.md (+51 -3)
📝 test/table-pipe-style-implicit-both.md (+51 -3)
📝 test/table-pipe-style-implicit-leading.md (+51 -3)
📝 test/table-pipe-style-implicit-none.md (+51 -3)
📝 test/table-pipe-style-implicit-trailing.md (+51 -3)

📄 Description

Adds fix to MD055 as per #1902

  • On expectedLeadingPipe && !actualLeadingPipe: insert | ahead of leading token in first cell of row
  • On !expectedLeadingPipe && actualLeadingPipe: remove | and any leading whitespace from first cell of row
  • On expectedTrailingPipe && !actualTrailingPipe: insert | after trailing token in last cell of row
  • On !expectedTrailingPipe && actualTrailingPipe: remove | and any trailing whitespace from last cell of row

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DavidAnson/markdownlint/pull/1903 **Author:** [@non-zero-sum](https://github.com/non-zero-sum) **Created:** 12/28/2025 **Status:** ❌ Closed **Base:** `next` ← **Head:** `next` --- ### 📝 Commits (1) - [`cbffa81`](https://github.com/DavidAnson/markdownlint/commit/cbffa8189b6403b2ce624901b7e72612a9017674) feat: add/remove leading/trailing piples for MD055 errors (fixes #1902). ### 📊 Changes **17 files changed** (+5818 additions, -709 deletions) <details> <summary>View changed files</summary> 📝 `doc/Rules.md` (+2 -0) 📝 `doc/md055.md` (+2 -0) 📝 `lib/constants.mjs` (+1 -1) 📝 `lib/md055.mjs` (+35 -9) 📝 `test/snapshots/markdownlint-test-custom-rules.mjs.snap` (+0 -0) 📝 `test/snapshots/markdownlint-test-exports.mjs.snap` (+0 -0) 📝 `test/snapshots/markdownlint-test-micromark.mjs.snap` (+0 -0) 📝 `test/snapshots/markdownlint-test-scenarios.mjs.md` (+5370 -675) 📝 `test/snapshots/markdownlint-test-scenarios.mjs.snap` (+0 -0) 📝 `test/table-pipe-style-explicit-both.md` (+51 -3) 📝 `test/table-pipe-style-explicit-leading.md` (+51 -3) 📝 `test/table-pipe-style-explicit-none.md` (+51 -3) 📝 `test/table-pipe-style-explicit-trailing.md` (+51 -3) 📝 `test/table-pipe-style-implicit-both.md` (+51 -3) 📝 `test/table-pipe-style-implicit-leading.md` (+51 -3) 📝 `test/table-pipe-style-implicit-none.md` (+51 -3) 📝 `test/table-pipe-style-implicit-trailing.md` (+51 -3) </details> ### 📄 Description Adds fix to MD055 as per #1902 - On expectedLeadingPipe && !actualLeadingPipe: insert | ahead of leading token in first cell of row - On !expectedLeadingPipe && actualLeadingPipe: remove | and any leading whitespace from first cell of row - On expectedTrailingPipe && !actualTrailingPipe: insert | after trailing token in last cell of row - On !expectedTrailingPipe && actualTrailingPipe: remove | and any trailing whitespace from last cell of row --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 20:14:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#3636
No description provided.