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
Close the Remaining CommonMark Gaps in prose_lint's Sentence-Length Block Parser #2341
The opt-in sentence-length check in .github/actions/prose-gate/prose_lint.py now joins wrapped Markdown lines before measuring a sentence (#2292). Its block detection is a documented heuristic approximation of CommonMark, and review found edge cases it still reads differently from CommonMark. None of them is reached by a default gate, since the check is opt-in.
Edge Cases
Text after a closing --> on the same line is skipped, though it renders as part of the HTML block.
A multi-line paragraph underlined with === or --- is a setext heading in CommonMark but is measured as prose.
Inside a list item, an indented wrapped line beginning with a non-1 ordered marker splits the sentence, where CommonMark reads a continuation.
A column-0 lazy continuation line resets the list state, so a following item-indented paragraph can read as indented code.
A table delimiter row is not checked against the header row's column count, so a prose line followed by -- | -- is dropped as a header.
A column-0 closing fence of a list-indented fence block resets the list state.
A fence-looking line inside an indented code block toggles the fence state, and a closing fence is not matched to the opener's character or length.
Double-backtick code spans mis-pair under the single-backtick pairing, and over a joined block one stray backtick can mask prose across lines.
Done When
Each case either matches CommonMark with a constructed test, or is recorded as an accepted limit in the check's docstring. A parser library is an option only if the prose gate may take a dependency.
Two cases raised by Copilot on #2344, both deferred here as parser edge cases of the opt-in sentence-length check:
A list marker (- , 1.) is counted as a prose word in the sentence's word total. The pre-existing per-line count did the same, so this is not a regression.
Indented list markers may cause false findings. Not reproduced with a nested-item probe or a marker after a paragraph, so a failing input is needed first.
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.
Activity
ptr727 commentedon Oct 4, 2026
Two cases raised by Copilot on #2344, both deferred here as parser edge cases of the opt-in
sentence-lengthcheck:-,1.) is counted as a prose word in the sentence's word total. The pre-existing per-line count did the same, so this is not a regression.Measure a Wrapped Markdown Sentence Whole in the Sentence-Length Check (
ptr727 commentedon Oct 23, 2026
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.