Repository navigation
Keep One List of Paragraph-Interrupting HTML Block Names Across pr_review.py and prose_lint.py - #3237
Conversation
…view.py and prose_lint.py The two tools disagreed on source and search, and pr_review.py left textarea out of its raw-text starts. GitHub's own renderer, asked through its markdown API, ends a paragraph at <source> and at <textarea> and not at <search>, so both lists now say that, and a test holds the two equal. Fixes #3228 Co-Authored-By: Claude Opus 5.5 <[email protected]>
OPENING_TAG ended a tag name at a word boundary, so a custom element such as <source-x> or <div-x> ended a paragraph, which GitHub's renderer does not do. Moving source into the block names made that reach <source-x> too. The name now ends at whitespace, >, />, or the line end, as pr_review.py's tag_opener ends it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e_lint.py Nothing failed if the boundary lost its /> or whitespace branch, so the interrupt test now carries <hr/> and a tab-separated <div. 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.
🟡 Changes recommended
Address the two unresolved tag-boundary issues in prose_lint.py.
1 open issue
What changed in this PR
This PR synchronizes HTML block and raw-text tag handling between pr_review.py and the prose gate.
Changes:
- Aligns block and raw-text tag sets.
- Tightens custom-element boundary matching.
- Adds parity and regression tests.
| File | Summary |
|---|---|
tests/test_prose_lint.py |
Adds renderer-aligned HTML behavior tests. |
tests/test_pr_review.py |
Verifies tag-set parity and boundaries. |
scripts/pr_review.py |
Updates HTML block and raw-text definitions. |
.github/actions/prose-gate/prose_lint.py |
Aligns tag recognition and boundaries. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3237 +/- ##
===========================================
+ Coverage 65.57% 65.59% +0.01%
===========================================
Files 17 17
Lines 9782 9787 +5
===========================================
+ Hits 6415 6420 +5
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:
|
The name boundary took \s, which also accepts a vertical tab or a no-break space that GitHub does not read as ending a tag name. It now takes the same HTML_SPACE class pr_review.py does, and the agreement test holds the two classes equal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GitHub's renderer starts an HTML block at <div followed by a vertical tab, and not at <div followed by a no-break space, so the boundary takes cmark's block-start whitespace, space, tab, newline, vertical tab, form feed, and carriage return. That differs from the attribute whitespace pr_review.py's HTML_SPACE holds, so the agreement test no longer holds the two equal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
…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
pr_review.pyand the prose gate'sprose_lint.pyeach listed the HTML block names that end a paragraph, and disagreed.pr_review.pycarriedsourceand left outsearch, whileprose_lint.pydid the reverse and treatedsourceas a standalone tag that ends nothing.pr_review.pyalso lefttextareaout of its raw-text starts.gh api markdown -f mode=gfm, settles it.para\n<source>\n*x*ends the paragraph at<source>,para\n<search>\n*x*stays one paragraph with*x*emphasized, andpara\n<textarea>\n\n*x*keeps*x*raw past the blank line. Both lists now say that.prose_lint.py'sOPENING_TAGended a block name at\b, so a custom element such as<source-x>or<div-x>ended a paragraph, which GitHub does not do. It now ends a name at whitespace,>,/>, or the line end, aspr_review.py'stag_openerdoes.test_pr_review.pyholds the two tools' name sets and raw-text sets equal, since the prose gate sits in a composite actionpr_review.pycannot import.Fixes #3228
Verification
test_pr_review.pyandtest_prose_lint.py: 1497 tests pass. The changed and new assertions each fail against the base lists or the base boundary, and the<hr/>and tab cases each fail against a pattern missing their branch.--check sentence-length, gives the same findings on this branch and on the base copy.\bboundary and the second a missing pin on its/>and tab branches, each fixed here. The third came back clean. The pre-existing indent gap it noted is filed as Bound the Indent of a Paragraph-Interrupting Tag Line in prose_lint.py #3236.🤖 Generated with Claude Code