You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pair Code Spans as Markdown Does in sentence-length and dead-path #4135
prose_lint.py's sentence-length rule misses an over-cap sentence that follows an escaped backtick. mask_code_and_quotes blanks code spans with the bare CODE_SPAN pattern, which does not skip an escape. So it pairs the escaped backtick with the next real span's opener, and blanks every word between them.
Constructed reproduction, where W is 30 copies of the word word:
$ printf 'Use \\` here. %s. End `x` now.\n\nUse a tick here. %s. End `x` now.\n' "$W" "$W" > a.md
$ python3 scripts/prose_lint.py a.md --check sentence-length
1 violation(s) across 1 file(s)
sentence-length 1
a.md:3: sentence-length: 30 words in one sentence -> sentences of 25 words or fewer
Line 1 carries the same 30-word sentence as line 3 and is not reported.
The class
Both sites pair code spans without the span-aware MARKDOWN_SPAN pattern that blank_code_spans uses:
mask_code_and_quotes, which sentence-length reads, uses bare CODE_SPAN, so an escaped backtick opens a span.
rule_dead_path scans LINK_TARGET over strip_inline_code, and INLINE_SPAN pairs backticks one line at a time too. A code span wrapped across a line break leaves its closer to pair with the next span's opener, so a link between them is hidden from the scan.
Expected
Each site pairs a code span as Markdown does, escapes and wrapped spans included, through the one primitive the charset and other prose rules already read.
Raised by a local review pass on the branch that moved the charset, semicolon, dash, dupword, spelling, and sentence-split rules onto that primitive.
Activity
Read a Markdown Code Span as Quoted Data and Pass a Semicolon Inside …
ptr727 commentedon Nov 13, 2026
Backlog burndown claim, round 2 (2026-11-13), away run, scope
develop. Branchburndown/hook-chain-gate, group: #4131, #4135, #4123, #4108. Tier:frontier(carried hook snippets and helper, the prose gate, entangled across one hook chain).Predicted files:
.github/actions/prose-gate/prose_lint.py.github/actions/prose-gate/prose-gate.jsonscripts/prose_lint.pytests/test_prose_lint.pycatalog/snippets/pre-commit/.pre-commit-config.yamlcatalog/snippets/pre-commit/README.mdcatalog/snippets/husky/pre-commitcatalog/snippets/husky/README.md.husky/pre-commit.husky/pre-pushcatalog/snippets/hub_fetch_run.pytests/test_hub_fetch_run.pytests/test_pre_commit_hook.pyscripts/README.mdGOVERNANCE.md("Running the Linters Locally (Known-Working Invocations)", the hook's diff-base sentence)Let the Prose Gate Choose a Commit's Diff Base, Pair Code Spans as Ma…