Repository navigation
Split a Table Row Only at an Unescaped Pipe in the Semicolon Rule - #3658
Conversation
The semicolon rule split a table row on every pipe, so an escaped pipe cut its cell in two. It now judges the cells markdown-it-py yields, the same cells the sentence-length rule reads, and skips the raw row lines those cells came from. Closes on promotion: #3655 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading the parser's cell tokens dropped text the row split used to judge, a blockquoted table's rows and any cell past the header's width. Keep the row split, and end a cell only where markdown-it-py ends one, at a pipe no backslash escapes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟡 Changes recommended
An active moderate bug remains in prose_lint.py: pipe escaping checks only the immediately preceding backslash, so even backslash runs can misclassify delimiters and produce incorrect lint results.
1 open issue
What changed in this PR
This pull request updates the semicolon rule to split Markdown table rows only at unescaped pipes, preserving escaped pipes within cells. It adds regression coverage and documents the behavior.
Changes:
- Adds escaped-pipe-aware cell splitting to
rule_semicolon. - Adds top-level and blockquoted table tests.
- Documents the table-cell escape rule.
The pull request has an unresolved moderate issue: the splitter treats a pipe preceded by an even-length backslash run as escaped. Two minor issues also remain regarding docstring formatting and ineffective blockquote coverage.
| File | Summary |
|---|---|
.github/actions/prose-gate/prose_lint.py |
Adds unescaped-pipe table-cell splitting; requires correction for even backslash runs and has a docstring formatting nit. |
tests/test_prose_lint.py |
Adds escaped-pipe regression coverage; the blockquote case does not exercise the changed splitter. |
scripts/README.md |
Documents the escaped-pipe cell-boundary behavior. |
This pull request requires changes.
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3658 +/- ##
===========================================
+ Coverage 81.60% 81.70% +0.09%
===========================================
Files 26 26
Lines 9070 9119 +49
===========================================
+ Hits 7402 7451 +49
Misses 1668 1668
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…Session Prompt Rules (#3667) Promotes the changes merged into `develop` since promotion #3636 to `main`. - [#3640](#3640) Pins the validator's `uvx ruff` to a Dependabot-managed manifest. - [#3642](#3642) Counts Copilot findings under the unresolved bullet and the file table. - [#3644](#3644) Aligns the split comment copies and drops the stale counts. - [#3646](#3646) Sends a command meant for the session's input line in a plain message, never in a blocking prompt. - [#3648](#3648) Opens the attended session by cloning a hub checkout of the session's own. - [#3650](#3650) Reads a held package as installed in both Linux host scripts. - [#3652](#3652) States the PowerShell `-Help` and `-h` form in the command-line argument rules. - [#3654](#3654) Counts sentences in Markdown table cells for the sentence-length check. - [#3658](#3658) Splits a table row only at an unescaped pipe in the semicolon rule. - [#3660](#3660) Finds table cell boundaries before blanking code spans and quotations. - [#3662](#3662) Names a stale job record on a completed run in `pr_review.py`. - [#3665](#3665) Keeps a line holding code after a block comment's closer out of `comment-added`. Its squash commit on `develop` carries the pull request's original title, which names a heredoc reading. That reading was withdrawn before the merge on decision #3666, so a workflow `run:` heredoc body still reads as code. - [#3669](#3669) Counts each `[Pn]` marker in a Copilot Findings cell, so a second finding in one cell is no longer dropped from triage. It answers one of the two findings Copilot raised on this promotion. The other is declined with a parser probe in its thread. Closes #3616 Closes #3610 Closes #3622 Closes #3638 Closes #3604 Closes #3511 Closes #3602 Closes #3456 Closes #3655 Closes #3657 Closes #3362 Closes #1664 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
The semicolon rule split a Markdown table row on every pipe, so an escaped
\|cut its cell in two. A comma before the escaped pipe then no longer excused the semicolon list after it, and the rule reported semicolons the whole cell allows.A cell now ends only at a pipe no backslash escapes, the same escape markdown-it-py honors when it splits a row.
Why Not the Parser's Cell Tokens
The issue proposed reading the
th_openandtd_openinline tokens thesentence-lengthrule reads. A local review pass found that loses text the row split reads today.Keeping the row split and fixing only where it ends a cell closes the issue's case and keeps both of those.
Changes
.github/actions/prose-gate/prose_lint.py:rule_semicolonsplits a row withCELL_BREAK, a pipe no backslash precedes.tests/test_prose_lint.py: an escaped pipe stays inside its cell, at top level and inside a blockquote. The row-per-cell test now uses a real table.scripts/README.md: states the escape rule.Verification
semicolonviolation, and reported two before.semicolonandsentence-lengthrun is unchanged.Local Review
Three recorded
local-strict-reviewpasses. The first raised the two regressions above, which moved the fix off the parser tokens. The second raised oneintroducedoverstatement in the docstring and README, which was narrowed. The third raised nothing.The pre-existing finding that the split runs after code spans and quotations are blanked is filed as #3657.
Closes on promotion: #3655
🤖 Generated with Claude Code