Skip to content

Keep an Emphasis Tag Quoted in Code When reduced Strips Emphasis in pr_review.py #3215

Closed

Description

@ptr727

The shape

reduced in scripts/pr_review.py strips emphasis markup through EMPHASIS.sub before any quotation is masked. So a finding that quotes an emphasis tag in code loses it from its own text: unwrap("Prefer over.") returns Prefer over ..

unwrap now keeps a <details> or <summary> tag a finding quotes in code (#3213), so the emphasis tags are the remaining case of the same class. reduced is shared by normal, unwrap, and heading_count, so a fix has to keep the text those three vet, print, and count the same.

Expected

An emphasis tag quoted in a code span or fence stays in the printed finding, with a test pinning the constructed case above.

Found by the local review of #3213.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestscriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions