Skip to content

Mask HTML Comments Before pr_review.py Reads details Tags #2414

Closed as not planned

Description

@ptr727

scripts/pr_review.py's <details> tag readers (DETAILS_TAG through details_tags, and DETAILS_OPEN) mask code spans but not HTML comments. HTML never reads a tag inside <!-- ... -->, so a close written there is text to a renderer but a close to these readers.

This is pre-existing. A bare </details> inside a comment was already read on develop, and the status help text already names a multi-line HTML comment as a quotation shape that carries a column-0 <details> past both masks. The #2384 branch (feature/auto-2384) widens the reach, since it now also reads an indented or attributed close at a line start, and so it also reads one inside a comment.

Repro, constructed. In the narrative of an overview, a block holding

<!--
  </details x>
-->

followed by a bullet - **Weird (#2):** y makes unrecognized_in return ['metadata label: Weird (#2)'] on that branch, where develop returns [], because the comment's close ends the section region early.

Direction. This fails loudly, reporting an unrecognized label, rather than as a false green. The <pre> variant is not a defect, since an end tag inside <pre> does close details in HTML.

Done looks like. The tag readers mask HTML comment spans the way they mask code spans, keeping offsets, with a test per shape built from constructed text, and the help text's note on that quotation shape updated to match.

Found by a local-strict-review pass on the #2384 branch and filed as a pre-existing finding, so it blocks nothing.

Activity

  1. added
    bug
    script
    on Oct 5, 2026
  2. ptr727 commented on Oct 8, 2026

    @ptr727
    OwnerAuthor

    Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": A bot overview does not hide a details close inside an HTML comment, and the issue records that this fails loudly.

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

    bugscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions