Skip to content

repo_audit: two stray backticks in separate paragraphs hide the findings between them #106

Closed

Description

@drevendev

Reader problem

A README that mentions the backtick key twice, in two different paragraphs, can hide every audit finding between them. The audit then reports a clean README that still has a TODO and an image without alt text.

Evidence

Observed on 2026-10-23 at master 1114ffe.

tools/repo_audit.py:179 masks inline code spans across the whole document. In CommonMark a code span can't cross a paragraph boundary, and GitHub renders a lone backtick as plain text.

# Title

Press the ` key to open the console.

## Install

TODO: write install steps

<img src="screenshot.png">

Close it with ` again.

python -I tools/repo_audit.py <fixture> gives 0 warnings. Removing either backtick gives 2 warnings: the placeholder and the missing alt. guides/repository-audit.md:82-83 hedges only about "unusual cross-line code/comment combinations".

docs_links.py already masks code spans paragraph by paragraph (_mask_inline_code_blocks).

Acceptance

  • repo_audit.py masks code spans within one paragraph or block, never across a blank line or a block boundary.
  • The fixture above becomes a regression test that expects both warnings.

Activity

  1. added
    bug
    on Oct 23, 2026
  2. added a commit that references this issue on Oct 23, 2026
    d94ff8e
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions