Skip to content

Keep One List of Paragraph-Interrupting HTML Block Names Across pr_review.py and prose_lint.py - #3237

Merged
ptr727 merged 5 commits into
developfrom
feature/html-block-names
Oct 19, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/html-block-names

Conversation

@ptr727

@ptr727 ptr727 commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • pr_review.py and the prose gate's prose_lint.py each listed the HTML block names that end a paragraph, and disagreed. pr_review.py carried source and left out search, while prose_lint.py did the reverse and treated source as a standalone tag that ends nothing. pr_review.py also left textarea out of its raw-text starts.
  • GitHub's own renderer, asked through 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, and para\n<textarea>\n\n*x* keeps *x* raw past the blank line. Both lists now say that.
  • prose_lint.py's OPENING_TAG ended 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, as pr_review.py's tag_opener does.
  • A new test in test_pr_review.py holds the two tools' name sets and raw-text sets equal, since the prose gate sits in a composite action pr_review.py cannot import.

Fixes #3228

Verification

  • test_pr_review.py and test_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.
  • A whole-tree prose gate run, default and --check sentence-length, gives the same findings on this branch and on the base copy.
  • Local strict review: three passes. The first raised the \b boundary 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

ptr727 and others added 3 commits October 19, 2026 12:02
…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]>
Copilot AI lite review requested due to automatic review settings October 19, 2026 19:11
@ptr727

ptr727 commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head db03aa20e90ab5ebe413269519512af0bb7e0ff7, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dbc5064b-de1a-402f-81e8-e581337d5b5f
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.59%. Comparing base (f1e5727) to head (dc85163).
⚠️ Report is 1 commits behind head on develop.

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              
Flag Coverage Δ
python-3.13 65.59% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ptr727 and others added 2 commits October 19, 2026 12:17
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]>
@ptr727

ptr727 commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head dc8516392f67da8da35d9f65507a1bcdd77f6e65, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit 1dbddd7 into develop Oct 19, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/html-block-names branch October 19, 2026 19:36
ptr727 added a commit that referenced this pull request Oct 19, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants