-
Notifications
You must be signed in to change notification settings - Fork 1
check-new-line-breaks: add clause-break check (SemBr rule 5), on by default #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dem-extra1
merged 12 commits into
main
from
claude/markdown-semantic-line-breaks-0aqhlh
Jul 28, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8c7f667
start: opt-in clause-break mode for check-new-line-breaks (closes #336)
claude 9a6b0b2
check-new-line-breaks: add clause-break check (SemBr rule 5), on by d…
claude cacdfcc
Merge origin/main
claude 2223dcc
Address review: gate on visible length, make min_length inclusive, dr…
claude 9e10e5f
Address review round 2: strip bare URLs, autolinks, and HTML entities
claude 4122582
Address review round 3: reconcile the cited figures, complete the str…
claude d812ba8
Merge remote-tracking branch 'origin/main' into claude/markdown-seman…
d-morrison c037d15
Fix two markup-stripping bugs in the clause check; hedge its wording
claude 4b6a700
Don't let a leading semicolon mask a real boundary further along
claude 7ddd569
Merge branch 'main' into claude/markdown-semantic-line-breaks-0aqhlh
dem-extra1 0bde33e
Point the #336 links at Morrison-Lab so they resolve
claude b2355f1
Address review round 5: two detection bugs, two doc overclaims
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| - **`check-new-line-breaks` now also flags a long line carrying a mid-line | ||
| semicolon** (#336), on top of the sentence check it already ran. | ||
| This is a proxy for the [SemBr spec](https://sembr.org)'s rule 5 | ||
| ("a semantic line break SHOULD occur after an independent clause"), | ||
| alongside the rule 4 MUST the check already enforced. | ||
| It is a proxy rather than a test of the rule, since deciding whether a mark | ||
| ends an *independent* clause needs a parser. | ||
|
|
||
| The new check is **on by default**, so existing callers get the extra | ||
| annotations without changing anything. | ||
| That is safe because the whole check stays warn-only unless `fail: true` is | ||
| set: it adds annotations, not build failures. | ||
| Set the new `clause-breaks: false` input to check sentences only, and | ||
| `clause-min-length` (default `80`, the spec's own rule 12) to move the | ||
| length gate. | ||
|
|
||
| Of the four marks rule 5 names, only the semicolon is used, and only past | ||
| that gate: see #336 for the | ||
| hit rates behind that choice. | ||
| The gate measures a line's visible length, after stripping inline markup | ||
| such as code spans, link targets, bare URLs, and HTML entities, so a line | ||
| that is long only because of a URL does not qualify -- rule 13's own | ||
| exemption. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.