Skip to content

Read Every Section of a Kind When Sections Alternate in One Wrapper in pr_review.py #3180

Closed

Description

@ptr727

The shape

marker_blocks reads each region's first section of a kind, then follows a chain of bounds. It stops at the first bound whose heading belongs to the other kind. So when sections of the two kinds alternate inside one wrapper, the second section of the first kind is read by nobody. This is not an observed shape. The local strict review on #3179 found it, and develop has the same gap, since it read only the first section of each kind per region.

Constructed body, in one Review details wrapper:

### Suppressed comments (1)
finding A
### Previously missed (1)
finding B
### Suppressed comments (2)
findings C and D

The suppressed reader ends its block at the previously-missed heading and stops there. The previously-missed reader ends its block at ### Suppressed comments (2) and stops too. C and D reach no block, and the digest prints suppressed=1. unrecognized_in cross-checks only previously-missed summaries, so this passes under shapes=ok. With the kinds swapped and <summary> headings, the Counter check reports the miss. With Markdown headings it stays silent.

Expected

Every counted section heading in a region opens its own block. One direction is to walk the chain over every bound line rather than only those matching the marker. At each bound line the walk opens a block only where the marker matches, and otherwise skips to that section's own bound. Prose past a bound is still never scanned, since only bound lines are visited.

Related: #3174.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingscriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions