[GH-ISSUE #1884] MD060 and empty table cells? #2615

Closed
opened 2026-03-07 20:09:23 +03:00 by kerem · 2 comments
Owner

Originally created by @beep on GitHub (Dec 5, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1884

Hi! A project I contribute to is blocked in upgrading from markdownlint-cli 0.45 to 0.46, and we think it may be related to MD060. But we’re not sure!

Basically, our project relies heavily on tabular data exported from Google docs into Markdown. Those tables look something like this:

| Date | Event description | Tags |
| :---- | :---- | :---- |
| Nov 1, 2024 | Something happened. |  |
| Jan 27, 2025 | Something happened. | #tag |
| Jan 28, 2025 | Something happened. |  |

This table type has three columns, and the final cell in each row may be empty. If that final cell has content, all’s well; but every row with an empty final cell now generates an error:

MD060/table-column-style Table column style [Table pipe has extra space to the left for style "compact"]

Near as we can tell, we’re adhering to the compact style, but it’s very possible we’ve missed something; is there something we should be doing differently?

(Also, it’s possible I’ve filed this question in the wrong repo; sincere apologies if so. I’d be more than happy to redirect.)

Originally created by @beep on GitHub (Dec 5, 2025). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1884 Hi! A project I contribute to is blocked in upgrading from markdownlint-cli 0.45 to 0.46, and we _think_ it may be related to [MD060](https://github.com/DavidAnson/markdownlint/blob/main/doc/md060.md). But we’re not sure! Basically, our project relies heavily on tabular data exported from Google docs into Markdown. Those tables look something like this: ``` | Date | Event description | Tags | | :---- | :---- | :---- | | Nov 1, 2024 | Something happened. | | | Jan 27, 2025 | Something happened. | #tag | | Jan 28, 2025 | Something happened. | | ``` This table type has three columns, and the final cell in each row may be empty. If that final cell has content, all’s well; but every row with an _empty_ final cell now generates an error: ``` MD060/table-column-style Table column style [Table pipe has extra space to the left for style "compact"] ``` Near as we can tell, we’re adhering to the compact style, but it’s very possible we’ve missed something; is there something we should be doing differently? (Also, it’s possible I’ve filed this question in the wrong repo; sincere apologies if so. I’d be more than happy to redirect.)
kerem 2026-03-07 20:09:23 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Dec 5, 2025):

As implemented, an empty cell in "compact" table style is expected to have a single space, not two. Making that change to your example satisfies the rule and produces no violations.

The single space requirement for empty cells seems natural to me, but was not an explicit design goal and instead is a natural consequence of the implementation for normal cells.

I can imagine why your export tool produces two spaces, but I think it would be improved by writing just one. Alternatively, since the table is being produced by a rule, I think it would be clearer for readers of the Markdown content to produce a table in "aligned" style rather than "compact". Either of those changes should address the issue for you.

I'm open to discussion, but currently not inclined to change the implementation of this rule because a single space seems consistent with the definition of "compact" just as 0 spaces seems consistent with the definition of "tight".

<!-- gh-comment-id:3618516838 --> @DavidAnson commented on GitHub (Dec 5, 2025): As implemented, an empty cell in "compact" table style is expected to have a single space, not two. Making that change to your example satisfies the rule and produces no violations. The single space requirement for empty cells seems natural to me, but was not an explicit design goal and instead is a natural consequence of the implementation for normal cells. I can imagine why your export tool produces two spaces, but I think it would be improved by writing just one. Alternatively, since the table is being produced by a rule, I think it would be clearer for readers of the Markdown content to produce a table in "aligned" style rather than "compact". Either of those changes should address the issue for you. I'm open to discussion, but currently not inclined to change the implementation of this rule because a single space seems consistent with the definition of "compact" just as 0 spaces seems consistent with the definition of "tight".
Author
Owner

@beep commented on GitHub (Dec 5, 2025):

Thanks so much for the response, @DavidAnson. I absolutely agree that one space would be clearer, but we’re locked into Google Docs’ output; I’m afraid we can’t customize the markdown further. We’ll probably investigate disabling MD060 for now.

Thanks again for the help! It’s much appreciated.

<!-- gh-comment-id:3618733410 --> @beep commented on GitHub (Dec 5, 2025): Thanks so much for the response, @DavidAnson. I absolutely agree that one space would be clearer, but we’re locked into Google Docs’ output; I’m afraid we can’t customize the markdown further. We’ll probably investigate disabling MD060 for now. Thanks again for the help! It’s much appreciated.
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#2615
No description provided.