Fix partially empty pipe table separator regression - #955
Merged
xoofx merged 3 commits intoSep 19, 2026
Merged
Conversation
Restore historical acceptance of empty separator cells while retaining the row-wide dash requirement introduced for xoofx#927. Cover partial and entirely empty rows, alignment, optional pipes, and inferred widths. Refs: dotnet/docfx#11147 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore Markdig's historical support for individual empty or whitespace-only pipe-table separator cells, while retaining rejection of separator rows with no dashes.
Commit 7959e3b fixed #927 by rejecting pipe-only separator rows. It also changed per-cell validation to reject empty cells, so previously accepted tables such as the following now render as literal paragraphs:
This regression was reported in dotnet/docfx#11147 after its Markdig upgrade. The reporter's follow-up distinguishes a partially empty separator from the entirely pipe-only rows targeted by #927.
This is a backward-compatibility fix, not a strict GFM compliance change: strict GFM requires dashes in each separator cell.
Changes
TryParseHeaderColumn, with no explicit alignment and zero dash count.FindHeaderRow'stotalDelimiterCount == 0guard unchanged, preserving the all-pipe-row fix and preventing division by zero when inferring widths. Keep trailing-pipe handling unchanged.Validation
ListUnorderedLooseTop) on each of .NET 8 and .NET 10.net462,netstandard2.0,netstandard2.1,net8.0, andnet10.0, with 0 warnings and 0 errors.Commands run from the repository root:
Validation was on Windows; the documentation site and unrelated solution tools/benchmarks were not built. No dependency or SDK policy changes.