Skip to content

Split a Table Row Only at an Unescaped Pipe in the Semicolon Rule - #3658

Merged
ptr727 merged 4 commits into
developfrom
feature/auto-3655
Oct 30, 2026
Merged

ptr727 merged 4 commits into
developfrom
feature/auto-3655

Conversation

@ptr727

@ptr727 ptr727 commented Oct 30, 2026

Copy link
Copy Markdown
Owner

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_open and td_open inline tokens the sentence-length rule reads. A local review pass found that loses text the row split reads today.

  • A table inside a blockquote yields no cell units, since the extractor skips blockquotes, so its rows would be read whole.
  • markdown-it-py drops any body cell past the header's column count, so a semicolon there would never be read.

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_semicolon splits a row with CELL_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

  • The issue's repro now reports no semicolon violation, and reported two before.
  • The prose gate suite passes, and both new tests fail against the old split.
  • A whole-tree semicolon and sentence-length run is unchanged.

Local Review

Three recorded local-strict-review passes. The first raised the two regressions above, which moved the fix off the parser tokens. The second raised one introduced overstatement 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

ptr727 and others added 4 commits October 30, 2026 03:51
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>
Copilot AI lite review requested due to automatic review settings October 30, 2026 11:03
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ptr727

ptr727 commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 221e158825e0dcb921b3abcfd4260573e98b2095, the content this pull request carries at that commit against develop, and it recorded 0 findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.70%. Comparing base (b38e084) to head (221e158).
⚠️ Report is 27 commits behind head on develop.

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              
Flag Coverage Δ
python-3.13 81.70% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit f8601df into develop Oct 30, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/auto-3655 branch October 30, 2026 11:13
ptr727 added a commit that referenced this pull request Oct 30, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants