Repository navigation
Keep an Emphasis Tag Quoted in Code When reduced Strips Emphasis in pr_review.py - #3234
Conversation
…r_review.py reduced dropped every emphasis tag before any quotation was masked, so a finding quoting one in code lost it from its own text. It now finds the tags in a copy with every quotation masked, as unwrap already does for TAGS, and the two share that drop. normal, unwrap, and heading_count read the same reduction, so the vetted, printed, and counted text still move together. Fixes #3215 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r_review.py The emphasis fix left the badge reduction beside it reading unmasked text, so a finding quoting a badge in code printed its alt text instead. Both reductions now go through one quote-aware substitution, which unwrap's tag drop shares. 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 |
There was a problem hiding this comment.
🔵 Needs a closer look
Two moderate findings remain unresolved.
No open issues 🎉
What changed in this PR
Updates review-text reduction to preserve emphasis tags and severity badges inside code quotations.
Changes:
- Adds shared quote-aware substitution logic.
- Reuses it for badge and tag handling.
- Adds regression tests for inline, fenced, mixed, and badge quotations.
| File | Summary |
|---|---|
tests/test_pr_review.py |
Adds regression coverage; includes a docstring wording finding. |
scripts/pr_review.py |
Implements quote-aware reductions; includes a nested-code-span preservation finding. |
Review effort: Lite
The test pins quoted badges as well as emphasis tags, and heading_count reads a count past the quotation rather than keeping it, so the name and docstring now say both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3234 +/- ##
===========================================
+ Coverage 65.57% 65.59% +0.01%
===========================================
Files 17 17
Lines 9782 9786 +4
===========================================
+ Hits 6415 6419 +4
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:
|
…he Quotation normal still rewrites counts and whitespace inside a quotation, so the docstring claims only the markup it keeps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Answering the round on 5399461, whose headline says "Needs a closer look" while naming no finding beyond its file table:
|
…ain (#3238) ## Summary Promotes two `pr_review.py` and prose gate fixes from develop. - #3234: an emphasis tag or severity badge a finding quotes in code is kept in the vetted, printed, and counted text, through one quote-aware substitution shared with `unwrap`'s tag drop. - #3237: `pr_review.py` and the prose gate's `prose_lint.py` hold one list of paragraph-interrupting HTML block names, settled against GitHub's renderer, with a test holding them equal. The prose gate also ends a block tag name at block-start whitespace rather than at a word boundary. Closes #3215 Closes #3228 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
reduceddropped every emphasis tag before any quotation was masked, so a finding quoting<strong>or<b>in code printedPrefer `` over ``.. It now finds the tags in a copy with every quotation masked.unquoted_sub, whichunwrap'sTAGSdrop shares in place of its own inline loop.normal,unwrap, andheading_countstill read the one reduction, so vetted, printed, and counted text move together. Every vetting path already masks quotations before reachingnormal, so no vetting result changes.Fixes #3215
Verification
tests/test_pr_review.py: 931 tests pass. The new test fails against the base reduction on itsunwrap, fenced, mixed, and quoted-badge assertions.🤖 Generated with Claude Code