You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Find Table Cell Boundaries Before Blanking Code Spans in the Semicolon Rule #3657
rule_semicolon in .github/actions/prose-gate/prose_lint.py splits a table row into cells after prose_lines has already blanked the row's code spans and quotations across the whole line. So a cell boundary inside either one is lost before the split runs.
An unescaped pipe inside a code span is blanked with the span, so the two cells markdown-it-py reads there are judged as one. A comma in the first then excuses a semicolon list in the second.
An unpaired " in one cell, such as an inch mark, pairs with a quote in a later cell. Every cell between them is blanked, so no semicolon there is read.
Repro
printf'| A | B | C |\n| --- | --- | --- |\n| x | a, b `c|d` e; f; g | z |\n| 2" pipe | a; b; c | "x" |\n'> probe.md
python3 scripts/prose_lint.py --check semicolon probe.md
Expected: five semicolon violations. Line 3's third markdown-it-py cell holds e; f; g with no comma, and line 4's a; b; c cell holds none either. Actual: none.
Done
The semicolon rule finds a row's cell boundaries before code spans and quotations are blanked, and a test covers each case.
Found by a local review pass on the fix for #3655.
Activity
Split a Table Row Only at an Unescaped Pipe in the Semicolon Rule (#3658
Find Table Cell Boundaries Before Blanking Code Spans and Quotations (#…