Skip to content

Promote the Quoted-Markup Reduction and One HTML Block Name List to Main - #3238

Merged
ptr727 merged 2 commits into
mainfrom
develop
Oct 19, 2026
Merged

ptr727 merged 2 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes two pr_review.py and prose gate fixes from develop.

Closes #3215
Closes #3228

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 19, 2026 12:20
…r_review.py (#3234)

## Summary

- `reduced` dropped every emphasis tag before any quotation was masked,
so a finding quoting `<strong>` or `<b>` in code printed `Prefer `` over
``.`. It now finds the tags in a copy with every quotation masked.
- The severity-badge reduction beside it had the same defect, so a badge
quoted in a fence printed as its alt text. Both now go through one
quote-aware `unquoted_sub`, which `unwrap`'s `TAGS` drop shares in place
of its own inline loop.
- `normal`, `unwrap`, and `heading_count` still read the one reduction,
so vetted, printed, and counted text move together. Every vetting path
already masks quotations before reaching `normal`, 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 its `unwrap`, fenced, mixed, and quoted-badge
assertions.
- Local strict review: two passes. The first raised the badge sibling,
which the second commit fixes, and the second pass came back clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…view.py and prose_lint.py (#3237)

## 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 #3236.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 19, 2026 19:36
@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: 8fca2036-1ce7-4460-a7c4-5d59781e5221
  • 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.

🔵 Needs a closer look

Moderate issues remain in masked-quotation handling and vertical-tab boundary consistency.

No open issues 🎉

What changed in this PR

Promotes parser fixes for quoted markup preservation and consistent HTML block-name handling.

Changes:

  • Adds quote-aware markup reduction.
  • Aligns HTML block and raw-text tag lists.
  • Expands parser and renderer behavior tests.
File Description
tests/​test_prose_lint.py Tests HTML boundary behavior.
tests/​test_pr_review.py Tests markup reduction and list parity.
scripts/​pr_review.py Adds quote-aware reduction and HTML names.
.github/​actions/​prose-gate/​prose_lint.py Aligns block-tag detection and boundaries.

Review effort: Lite

@ptr727

ptr727 commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

Answering the round on 1dbddd7, whose headline names two moderate issues and opens no thread. Both predate this promotion, and each is filed:

@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 (1dbddd7).
⚠️ Report is 403 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3238      +/-   ##
==========================================
+ 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
ptr727 merged commit 09aa946 into main Oct 19, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants