Repository navigation
End a Code Span at Every Paragraph-Ending Line in pr_review.py - #3242
Conversation
CODE_SPAN and the quoted-coverage reader now share one model of a line that interrupts a paragraph: a list item with content, an ordered item at 1, an ATX heading, a thematic break, a fence opener, and an HTML block start, each shape settled by GitHub's renderer. A span also ends where such a line sits behind a blockquote marker. An HTML block name now ends at a vertical tab too, and a test holds that boundary equal to the prose gate's. Fixes #3227 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟡 Changes recommended
Nested blockquote detection must support four spaces between markers.
1 open issue
What changed in this PR
This PR centralizes Markdown paragraph-interruption detection for code-span masking and coverage parsing, with expanded regression tests.
Changes:
- Adds shared block and whitespace patterns.
- Updates span and coverage parsing.
- Adds boundary tests for lists, headings, fences, quotes, and HTML blocks.
| File | Summary |
|---|---|
tests/test_pr_review.py |
Adds regression coverage for Markdown boundaries. |
scripts/pr_review.py |
Implements shared paragraph-interruption matching. |
Review effort: Lite
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3242 +/- ##
===========================================
- Coverage 65.59% 65.58% -0.01%
===========================================
Files 17 17
Lines 9787 9790 +3
===========================================
+ Hits 6420 6421 +1
- Misses 3367 3369 +2
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:
|
…nt to Main (#3245) ## Summary Promotes two paragraph-boundary fixes, one in `pr_review.py` and one in the prose gate's `prose_lint.py`, from develop. - #3242: `CODE_SPAN` and the quoted-coverage reader share one model of a line that interrupts a paragraph. That model covers list items, ATX headings, thematic breaks, fence openers, and HTML block starts, with or without blockquote markers, and GitHub's renderer settled each shape. An HTML block name ends at a vertical tab, and a test holds that boundary equal to the prose gate's. - #3244: the prose gate ends a paragraph at a block tag line only within three columns of the open paragraph's container. An item's content column counts the marker's spaces in tab-expanded columns, and every empty item marker is read as an item where GitHub reads one. Closes #3227 Closes #3236 Closes #3243 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
CODE_SPANinscripts/pr_review.pypaired a stray backtick across a list item, a heading, a thematic break, or a fence opener, because it ended a span only at a blank line or an HTML block start. It now ends a span at every line that interrupts a paragraph, from one shared pattern,INTERRUPTS_PARAGRAPH.STARTS_BLOCK, which ends a quotation's lazy continuation incoverage_statements, is now that same pattern.0001.counts.####### hand#hdo not.BLOCK_SPACE), as the End a Code Span at Every Paragraph-Ending Block Start in pr_review.py #3227 comment asked. The agreement test holds that constant equal to the prose gate's.Fixes #3227
Local review
There were three recorded
local-strict-reviewpasses. Pass 1 raised a setext-underline regression inside containers (fixed by dropping that arm) and a quoted block-start gap (fixed). Pass 2 raised exponential backtracking in the new quote prefix (fixed, now linear). Two pre-existing findings were filed as #3240 and #3241.The edit budget was spent with one
introducedfinding open: the quote prefix allowed three spaces between two markers where GitHub allows four. Copilot raised it too, and 0ce5c6a fixed it under a fourth recorded pass, which found nothing further.🤖 Generated with Claude Code