Skip to content

Bound a Paragraph-Interrupting Tag Line's Indent by Its Container in prose_lint.py - #3244

Merged
ptr727 merged 5 commits into
developfrom
feature/prose-tag-indent
Oct 19, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/prose-tag-indent

Conversation

@ptr727

@ptr727 ptr727 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

OPENING_TAG in the prose gate matched a block tag at any indent, so a tag line indented four or more columns under a paragraph ended it, where GitHub reads it as lazy continuation text. The sentence-length check then measured two short sentences where GitHub shows one.

  • A tag line now ends the open paragraph only within three columns of that paragraph's container. The reference is captured when the paragraph opens: 0 at the top level, or the list item's content column inside an item.
  • content_offset gives an item's content column the way CommonMark does: the marker's run of up to four spaces, or one past the marker where five or more follow or the item is empty. The code_indent reading of an item's indented code follows the same column now, which corrects a six-column paragraph under - that was read as code.
  • A bare - with no paragraph open sets the list state as an empty item.
  • GitHub's renderer checked every tested shape. A base-vs-head run of sentence_length_findings over all tracked Markdown files shows no difference.

Fixes #3236
Fixes #3243

Local review

There were three recorded local-strict-review passes. Pass 1 found that a lazy line moved the reference and that marker.end() missed the marker's spaces, both fixed. Pass 2 found the bare - empty item, fixed. A related CODE_SPAN case went onto #3240.

The edit budget was spent with one introduced finding open: an empty item opening on *, +, 1., or 1). Copilot raised it too, along with item columns after a tab. The review loop fixed both: the splitter reads items through its own ITEM_MARKER, which accepts the end of the line, and an empty item interrupts an open paragraph only from outside its container. That closes #3243 instead of deferring to it. Two further recorded passes found nothing open.

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 19, 2026 16:11
…prose_lint.py

A block tag line indented four or more columns past the paragraph's
container is lazy continuation text on GitHub, so it no longer ends
the paragraph the sentence-length check measures. Inside a list item
the bound is measured from the item's content offset, so a nested tag
line still counts.

Fixes #3236

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 19, 2026 23:24
@ptr727

ptr727 commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 8fc4215a721a1cd30d4aa6dab587999d45c6edec, the content this pull request carries at that commit against develop, and it recorded 1 finding.

@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: 6d022a26-5eb0-4104-be15-34072b9e60a6
  • 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

Moderate issues remain for empty list markers and tab-aware indentation.

2 open issues
What changed in this PR

Updates Markdown prose parsing so HTML tag interruption respects list-item indentation.

Changes:

  • Tracks paragraph container offsets.
  • Computes list content columns and empty-item state.
  • Adds indentation regression tests.
File Summary
tests/​test_prose_lint.py Adds indentation regression coverage.
.github/​actions/​prose-gate/​prose_lint.py Updates paragraph and list indentation handling.

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.
⚠️ Please upload report for BASE (develop@bd7f23a). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3244   +/-   ##
==========================================
  Coverage           ?   65.60%           
==========================================
  Files              ?       17           
  Lines              ?     9790           
  Branches           ?        0           
==========================================
  Hits               ?     6423           
  Misses             ?     3367           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 65.60% <ø> (?)

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 commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727
ptr727 merged commit 36251ed into develop Oct 19, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/prose-tag-indent branch October 19, 2026 23:52
ptr727 added a commit that referenced this pull request Oct 20, 2026
…nt to Main (#3245)

## Summary

Promotes two paragraph-boundary fixes, one in `pr_review.py` and one in
the prose gate's `prose_lint.py`, from develop.

- #3242: `CODE_SPAN` and the quoted-coverage reader share one model of a
line that interrupts a paragraph. That model covers list items, ATX
headings, thematic breaks, fence openers, and HTML block starts, with or
without blockquote markers, and GitHub's renderer settled each shape. An
HTML block name ends at a vertical tab, and a test holds that boundary
equal to the prose gate's.
- #3244: the prose gate ends a paragraph at a block tag line only within
three columns of the open paragraph's container. An item's content
column counts the marker's spaces in tab-expanded columns, and every
empty item marker is read as an item where GitHub reads one.

Closes #3227
Closes #3236
Closes #3243

🤖 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