Skip to content

Find Table Cell Boundaries Before Blanking Code Spans in the Semicolon Rule #3657

Closed

Description

@ptr727

Summary

rule_semicolon in .github/actions/prose-gate/prose_lint.py splits a table row into cells after prose_lines has already blanked the row's code spans and quotations across the whole line. So a cell boundary inside either one is lost before the split runs.

  • An unescaped pipe inside a code span is blanked with the span, so the two cells markdown-it-py reads there are judged as one. A comma in the first then excuses a semicolon list in the second.
  • An unpaired " in one cell, such as an inch mark, pairs with a quote in a later cell. Every cell between them is blanked, so no semicolon there is read.

Repro

printf '| A | B | C |\n| --- | --- | --- |\n| x | a, b `c|d` e; f; g | z |\n| 2" pipe | a; b; c | "x" |\n' > probe.md
python3 scripts/prose_lint.py --check semicolon probe.md

Expected: five semicolon violations. Line 3's third markdown-it-py cell holds e; f; g with no comma, and line 4's a; b; c cell holds none either. Actual: none.

Done

The semicolon rule finds a row's cell boundaries before code spans and quotations are blanked, and a test covers each case.

Found by a local review pass on the fix for #3655.

🤖 Generated with Claude Code

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

    pre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions