Repository navigation
Share One Attribute Tail Across the Details and Summary Opener Readers in pr_review.py - #3230
Conversation
…s in pr_review.py `attributes` is the one tail after an opener's name, so an opener quoted in code as `<details [^>]*>` is no tag to any reader, and a quoted value holding a `>` is read whole. Fixes #3212 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n a Letter The readers spanning lines read a line break inside a quoted value again, an attribute name opens on a letter so a masked span cannot supply one, and one HTML whitespace class serves every reader. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
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 |
`TAGS` and `HTML_TAG` read a name opening on `_` or `:` again, as CommonMark does, so `unwrap` strips `<details :open>` as it did before. `SUMMARY` alone keeps the letter-only lead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟡 Changes recommended
The shared parser regresses attribute names beginning with : or _.
1 open issue
What changed in this PR
This PR centralizes HTML attribute-tail parsing across pr_review.py readers and adds regression coverage.
Changes:
- Adds shared parsing with quoted
>and multiline support. - Updates summary/details and tag readers.
- Adds table-driven opener tests.
Review finding: preserve : and _ attribute-name leads for shared readers (moderate, 4 votes).
| File | Description |
|---|---|
scripts/pr_review.py |
Adds shared attribute parsing and updates readers. |
tests/test_pr_review.py |
Adds coverage for valid, malformed, quoted, and multiline openers. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3230 +/- ##
==========================================
Coverage ? 65.57%
==========================================
Files ? 17
Lines ? 9782
Branches ? 0
==========================================
Hits ? 6415
Misses ? 3367
Partials ? 0
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:
|
…il to Main (#3231) - #3229 ends an inline code span in `pr_review.py` at a line opening a GFM HTML block, as GitHub renders it. So a stray backtick no longer pairs across `</details>` or `<details>`, and the digest no longer prints those wrappers raw. A trusted author's attestation marker on a line of its own between two stray ticks now attests, which is the maintainer's "follow GitHub" decision, and the dead span mask in front of `attestation()` is gone. - #3230 gives the `<details>` and `<summary>` opener readers one attribute tail, `attributes()`. An opener quoted in code as `<details [^>]*>` is no tag to any of them, and a quoted value holding a `>` is read whole. The readers spanning lines take a line break where HTML does. Neither change edits a skill, so this machine's installed Skills are unchanged at release. Closes #3214 Closes #3212 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
scripts/pr_review.pyended each<details>or<summary>opener's name through one primitive,tag_opener, but each reader spelled the attribute tail after it on its own. One of them,[^>]*>, read an opener quoted in code as<details [^>]*>as a tag that ate the text after it up to the next>. Implements #3212.attributes(spanning, lone_space)is the one tail.SUMMARY,DETAILS_OPENER, andDETAILS_TAGmove onto it besideTAGSandHTML_TAG, which already usedATTRIBUTES.>, and anything that is not an attribute ends the tag unread.spanningreaders (SUMMARY,DETAILS_TAG) take a line break between attributes and inside a quoted value, as HTML does. The others read one line.lone_space=FalsekeepsSUMMARY's refusal of the<summary >a code span masked to a space leaves.HTML_SPACEnames the HTML whitespace class thattag_opener,attributes, and the HTML block start each spelled out.>, and a self-closed opener as read, and<details [^>]*>as not read. Multi-line rows cover the two spanning readers.Verification
python3 -m unittest discover -s tests: OK. ruff, ruff format, mypy,repo_gate.py, the prose gate (whole tree, and the diff withsentence-length), andbuild_dist.py --checkare clean.Local review findings still open
The local strict review ran two rounds, and the edit budget is spent. One finding remains:
SUMMARYneeds so a masked span cannot supply a name, also narrowsTAGSandHTML_TAG. Sounwrapnow leaves<details :open>or<summary _id="a">raw where it stripped them before. Fixed in 8dad7fb, which keeps the letter-only lead tolone_space=Falseand gives the other readers CommonMark's[A-Za-z_:]lead. Its own local pass raised nothing.🤖 Generated with Claude Code