Repository navigation
Recognize a Details or Summary Opener Through One Primitive in pr_review.py - #3209
Conversation
…iew.py Every reader of a `<details>` or `<summary>` opener now ends the tag name where Markdown does, through `tag_opener`. `HEADING` and `heading_of` had no boundary at all, so `<summaryx>` opened a heading line, and the fold and summary readers each disagreed on `<summary/>` and `<details/x>`. Fixes #3206 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Answers the local review of the tag-opener primitive. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Answers the second local review of the tag-opener primitive. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
A recorded local strict-review pass covers head |
…ong Docstring Sentence Answers the two findings the local review left listed on the pull request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Address the outstanding documentation and overlapping-test findings before approval.
2 open issues
What changed in this PR
Centralizes HTML opener parsing in pr_review.py and adds regression coverage for tag boundaries and heading extraction.
Changes:
- Adds shared opener primitives.
- Updates heading, folding, and details parsing.
- Adds boundary and nested-heading tests.
| File | Description |
|---|---|
tests/test_pr_review.py |
Added opener boundary and nested-heading regression tests. |
scripts/pr_review.py |
Centralized opener recognition and updated heading/detail readers. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3209 +/- ##
===========================================
+ Coverage 65.49% 65.50% +0.01%
===========================================
Files 17 17
Lines 9758 9761 +3
===========================================
+ Hits 6391 6394 +3
Misses 3367 3367
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:
|
… Tag Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
@coderabbitai review |
✅ Action performedReview finished.
|
…ain (#3210) - #3209 makes every reader of a `<details>` or `<summary>` opener in `pr_review.py` end the tag name through one primitive, `tag_opener`, on CommonMark's rule: HTML whitespace, the end of a line, `>`, or `/>`. `HEADING` and `heading_of` had no boundary at all, so `<summaryx>` opened a heading line. `heading_of` now reads the heading through one anchored `SUMMARY.match`, so a block whose own summary is rejected no longer takes a nested entry's summary as its heading. `TAGS`, which strips only a bare tag, is filed as #3208. The change is to scripts and tests only, so no installed Skill changes at release. Closes #3206 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
Every reader of a
<details>or<summary>opener inscripts/pr_review.pynow ends the tag name through one primitive,tag_opener, on CommonMark's rule: HTML whitespace, the end of a line,>, or/>.DETAILS_OPEN,SUMMARY,DETAILS_OPENER,HEADING,DETAILS_TAG,FOLD_OPENER, andFOLD_STOPbuild on it, and a newSUMMARY_OPENERservesHEADING,FOLD_OPENER, andheading_of.HEADINGandheading_ofhad no boundary at all, so<summaryx>opened a heading line.heading_ofnow reads the heading through one anchoredSUMMARY.match, so a block whose own summarySUMMARYrejects no longer takes a nested entry's summary as its heading.<name>,<name\tid="a">, and<name/>as an opener and<namex>,<nameplus a no-break space, and<name/x>as none, at every site, plus the end-of-line arm.TAGS, which strips only a bare tag, is left as it is and filed as #3208.Part of #3206.
Local review findings
The two findings the local pass first listed here, a 28-word
tag_openerdocstring sentence and a table test duplicating its neighbour, are fixed in 905fdd0. A later pass found the change toheading_of's first guard unpinned, fixed in 2d41e44. The pass over the current head raised nothing.🤖 Generated with Claude Code
Summary by CodeRabbit
<details>and<summary>tags with varied whitespace and opener formats, including incomplete tag prefixes.