Repository navigation
docs: Break lines at meaning boundaries - #751
Merged
Merged
Conversation
krlmlr
force-pushed
the
claude/sembr
branch
from
September 13, 2026 13:18
b46cb11 to
dd41eb9
Compare
krlmlr
force-pushed
the
claude/sembr
branch
3 times, most recently
from
September 13, 2026 18:37
7e768a0 to
210c83d
Compare
krlmlr
force-pushed
the
claude/sembr
branch
from
September 13, 2026 18:45
299ae26 to
210c83d
Compare
Reformatting only, no wording changes: prose in README.Rmd, the vignettes and the roxygen and inline comments under R/ now breaks at sentence and clause boundaries rather than wrapping to a fixed width. The payoff is sentence-level diffs. A reworded sentence touches one line instead of reflowing the paragraph around it, so review sees the change and not the rewrap. man/*.Rd is regenerated because roxygen2 passes source line breaks through to the .Rd. The rendered help is byte-identical -- checked with tools::Rd2txt() over every topic -- as is the rendered README. `Config/roxygen2/version` moves to 8.1.0.9000, the version that regenerated these files and the one the rest of the fleet already pins. It is the only non-prose change here. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Amendment to the semantic line break pass: when a sentence has to span more than one line, that sentence and the one after it each start at the beginning of a line. Where two sentences are separated by two spaces, no line break can survive: Rd2txt() renders the gap literally, and roxygen2 strips leading whitespace from continuation lines, so breaking there would drop a space from the rendered help. Those sentences are joined onto one long line instead. A line over 140 columns changes nothing a reader sees; a break at the double space would. Reformatting only, no wording changes. man/*.Rd is regenerated because roxygen2 passes source line breaks through to the .Rd. The rendered help is byte-identical -- checked with tools::Rd2txt() over all 69 topics. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Inside a roxygen block the first line of a paragraph, and every tag line, keeps one space after `#'`; every continuation line of that paragraph now has two. The paragraph structure of the source becomes visible without reading ahead, and in packages that do not enable roxygen2 markdown the extra space is what carries a sentence gap across a line break. DBI enables markdown (`Roxygen: list(markdown = TRUE)`), and commonmark strips leading whitespace from a paragraph's continuation lines, so here the indent reaches neither `man/*.Rd` nor the rendered help. Nothing is regenerated: roxygen2 writes no file, and `tools::Rd2txt()` is unchanged for all 69 topics. That also means the long lines this pass created cannot come apart again. Where two sentences are separated by two spaces, the pair still has to share one line -- under markdown no leading-space, trailing-space or hard-break form survives into the `.Rd`, so breaking there would drop a space from the rendered help. Reformatting only, no wording changes: the words either side of the diff are identical once comment markers and whitespace are collapsed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The two-space continuation indent never reached the `.Rd`. DBI sets `Roxygen: list(markdown = TRUE)`, and commonmark strips the leading whitespace of a continuation line before roxygen2 writes the topic, so the indent changed no rendered output -- `man/` was byte-identical with it and without it. The sentence gap it was meant to carry now comes from roxygen2 itself (krlmlr/roxygen2#8), which indents the line break after a sentence at the point where the break is emitted. The source-level indent is redundant, so it comes out. This is `git revert` of the indent commit, not a substitution: that pass also normalised pre-existing three-space tag continuations down to two, and the revert puts them back at three. The long joined lines the sembr pass created stay as they are. Undoing those is a separate decision, and the roxygen2 fix is what will eventually let them come apart. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The long joined lines existed to protect a sentence gap: two spaces after a sentence period are content, Rd2txt() renders them literally, and a line break there drops one of them. Joining the sentences onto one line was the only way to keep the gap. The joins come out, so every sentence starts its own line again. Reformatting only, no wording changes. man/ is left to CI, which regenerates it from these sources. A line break which follows the end of a sentence currently renders as one space rather than two. Restoring that gap needs a patched roxygen2, which is a separate decision and a separate pull request, so it is deliberately not part of this change. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
krlmlr
force-pushed
the
claude/sembr
branch
from
September 13, 2026 20:30
83f7930 to
fc6d639
Compare
3 of 7 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reformatting only, no wording changes. Prose in
README.Rmd, seven vignettes, and the roxygen and inline comments underR/now breaks at sentence and clause boundaries rather than wrapping to a fixed width.The payoff is sentence-level diffs. A reworded sentence touches one line instead of reflowing the paragraph around it, so review sees the change and not the rewrap.
68 of 161
R/files needed work; the other 93 had no multi-line prose to rewrap.spec.Rmdis untouched — it is front matter and one chunk.A sentence that spans more than one line starts at the beginning of a line, and so does the sentence after it. A sentence that fits on one line may still share that line with its neighbours. The very long joined lines an earlier revision of this branch carried — the longest at 461 columns — are gone again: nothing under
R/now exceeds the 140-column ceiling.man/is left to CIman/is not part of this pull request. Every commit in the chain leaves the.Rdfiles byte-identical tomain, and CI regenerates and commits them after merge, so what is under review here is the sources alone.Verification
.Rmd, before vs. after — byte-identical.render_readme()run twice — byte-identical both times.air format .— no further changes; everyR/file parses.One consequence, stated plainly
A line break which follows the end of a sentence currently renders as one space, not two, so writing one sentence per line drops the sentence gap from the rendered help. Restoring it needs a patched roxygen2, which is a separate decision: it is #754, stacked on top of this chain, and can be taken or left on its own. Without it, this change renders as the package renders today, minus that gap.
Left alone
man-roxygen/methods.R— five lines of tags and an\Sexpr, no prose.vignettes/spec.mdandspec.html— generated from DBItest.NEWS.md, tests,@examples, code chunks,\preformattedand indented blocks, YAML front matter.DBI-history.Rmd, the resources list inDBI-proposal.Rmd.Part of a fleet-wide pass. r-lib/here#195 is the reference PR, reviewed by hand before the rest were run.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m