Repository navigation
Conversation
…iew.py (#3209) ## Summary Every reader of a `<details>` or `<summary>` opener in `scripts/pr_review.py` now 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`, and `FOLD_STOP` build on it, and a new `SUMMARY_OPENER` serves `HEADING`, `FOLD_OPENER`, and `heading_of`. - `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 `SUMMARY` rejects no longer takes a nested entry's summary as its heading. - A table test pins `<name>`, `<name\tid="a">`, and `<name/>` as an opener and `<namex>`, `<name` plus 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_opener` docstring sentence and a table test duplicating its neighbour, are fixed in 905fdd0. A later pass found the change to `heading_of`'s first guard unpinned, fixed in 2d41e44. The pass over the current head raised nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved handling of HTML `<details>` and `<summary>` tags with varied whitespace and opener formats, including incomplete tag prefixes. * Corrected heading selection so nested summaries no longer take precedence over the outer heading. * **Tests** * Expanded coverage for tag-name boundaries, supported opener formats, and heading selection. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
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 |
There was a problem hiding this comment.
🟢 Approval recommended
All reviewed changes have no unresolved blocking issues.
No open issues 🎉
What changed in this PR
Promotes shared HTML tag-opener parsing in pr_review.py and adds regression coverage for heading selection and tag boundaries.
Changes:
- Centralizes
<details>and<summary>opener recognition. - Prevents malformed or nested summaries from being misread.
- Adds boundary and heading-selection tests.
| File | Description |
|---|---|
tests/test_pr_review.py |
Adds opener-boundary and heading regression tests. |
scripts/pr_review.py |
Implements shared opener matching and anchored heading parsing. |
Review effort: Lite
|
@coderabbitai review |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3210 +/- ##
==========================================
+ 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:
|
<details>or<summary>opener inpr_review.pyend the tag name through one primitive,tag_opener, on CommonMark's rule: HTML whitespace, the end of a line,>, or/>.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 summary is rejected no longer takes a nested entry's summary as its heading.TAGS, which strips only a bare tag, is filed as Strip an Attributed Details or Summary Opener Through TAGS in pr_review.py #3208.The change is to scripts and tests only, so no installed Skill changes at release.
Closes #3206
🤖 Generated with Claude Code