Skip to content

Count Sentences in Markdown Table Cells for the Sentence-Length Check #3456

Closed

Description

@ptr727

Summary

prose_lint.py --check sentence-length never counts a sentence inside a Markdown table cell, so an over-cap sentence in a cell passes the gate. It reads only paragraph inline units, and a table cell is not one. Tables in the fleet's docs often hold full-sentence prose, such as the environment-variable tables, so the cap goes unchecked there.

Repro

W="one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty twentyone twentytwo twentythree twentyfour twentyfive twentysix twentyseven."
printf '# Probe\n\n| Name | Effect |\n| --- | --- |\n| `X` | %s |\n\n%s\n' "$W" "Para $W" > probe.md
python3 scripts/prose_lint.py --check sentence-length probe.md

Expected: two violations, at line 5 (the 27-word cell) and line 7 (the 28-word paragraph). Actual: only probe.md:7 is reported.

Done

A table cell's text is split into sentences and held to the same cap as a paragraph, and a test covers a cell.

🤖 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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions