Skip to content

Keep One Primitive per Block Shape in pr_review.py #3241

Closed

Description

@ptr727

The shape

scripts/pr_review.py now carries INTERRUPTS_PARAGRAPH and LINE_END as the model of a line opening a block. Two other sites spell some of the same shapes their own way:

  • coverage_statements decides whether a line closes its own block with #{1,6}(?:\s|$)|([-*_])(?: *\1){2,} *$|(?:=+|-+) *$|<!--. Its \s takes a vertical tab after # where GitHub does not, and its * refuses a thematic break spaced by tabs, such as *\t*\t*, which GitHub accepts.
  • MARKDOWN_HEADING, \s*#{1,6}\s, carries the same \s after the hashes.
  • INTERRUPTS_PARAGRAPH's fence arm and LINE_END each restate a piece of FENCE.

Each spelling was fixed where it was found. A sibling written separately is the one the next fix misses.

Expected

Each heading, thematic-break, and fence shape has one primitive in the file, and the sites above compose from it, with the differing whitespace cases pinned by a test.

Found by the local review of the #3227 fix.

Activity

  1. added
    enhancement
    script
    on Oct 19, 2026
  2. added a commit that references this issue on Oct 20, 2026
    6472b7c
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

    enhancementscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions