Conversation
krlmlr
added this pull request to stack #256
September 13, 2026 21:48
krlmlr
force-pushed
the
claude/sembr
branch
from
September 13, 2026 21:48
9e3f7ca to
6c5614c
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. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
A sentence that spans more than one line now starts at the beginning of a line, and so does the sentence after it. Three roxygen paragraphs carried a sentence boundary mid-line while one of the two sentences was itself broken. Where the two sentences are separated by a double space, breaking at that boundary is not an option: roxygen2 strips leading and trailing whitespace from continuation lines, so the gap would collapse to one space in the rendered help. Those sentences are joined onto one long line instead. The line runs past 140 columns, which changes nothing a reader sees. 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. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Continuation lines in roxygen blocks now carry two spaces after the
comment marker instead of one, so that a sentence which starts on its
own line keeps a full sentence gap in the rendered help.
In this package the indent is source style only, and man/*.Rd is not
regenerated: the package sets `Roxygen: list(markdown = TRUE)`, and in
markdown mode roxygen2 strips the leading whitespace of every
continuation line before it reaches the .Rd -- measured here, in
`@description`, `@details`, `@return` and in raw Rd inside `\describe{}`
alike.
For the same reason the three long lines in `R/criterion.R` and
`R/thisfile.R` stay joined. They exist because a sentence pair is
separated by two spaces, and breaking them was measured to render as a
single space, which is a loss of a sentence gap rather than a gain.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The two-space continuation indent never reached the `.Rd`: this package sets `Roxygen: list(markdown = TRUE)`, and commonmark strips the leading whitespace of a continuation line before the help page is written. The sentence gap now comes from roxygen2 itself, which indents the line break at the point where the break is emitted, so the source-level indent is redundant. `man/` is unaffected either way. Reverting rather than substituting also restores the paragraph and tag alignment that the indent pass changed along the way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Several roxygen blocks carried two or three sentences on one very long line. They were joined on purpose: a line break between two sentences used to drop the second of the two spaces that separate them, because commonmark discards the whitespace a line break stands for. Keeping the sentences on one line was the only way to keep the gap. The joins come out all the same: every sentence starts a line again, and long sentences break at clause boundaries. 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
krlmlr
force-pushed
the
claude/sembr
branch
from
September 14, 2026 05:57
1cdeb15 to
083c7eb
Compare
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.
Replaces #247, which had its head on a fork and so could not join the pull request stack. Same branch, same commits.
Reformatting only, no wording changes. Prose in
README.Rmd, the vignette, 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.
man/is left to CIman/*.Rdis not edited by hand here. roxygen2 passes source line breaks straight through to the.Rd, so reformatting the sources does move the generated files — but they are generated output, and theCommit and push the generated changesstep after Roxygenize regenerates and commits them, so they arrive on this branch as an automated commit rather than in the hand-written diff, which stays prose only. The README was rendered twice, byte-identical both times.The joined sentences, and the sentence gap
Several roxygen blocks in
R/criterion.RandR/thisfile.Rcarried two or three sentences on one very long line. They were joined on purpose: a line break between two sentences drops the second of the two spaces that separate them, because commonmark discards the whitespace a line break stands for, so keeping the sentences on one line was the only way to keep the gap. The last commit takes the joins out, so every sentence starts a line again and long sentences break at clause boundaries.That is the one place where this branch on its own changes rendered help: with a stock roxygen2 those sentence pairs come out with one space between them instead of two.
tools::Rd2txt()over the 6 topics whose.Rdchanged puts 2 of them in that position — inthisfile.Rd,script. This isbecomesscript. This is, androot_criterion.Rdmoves the same way. Restoring the gap needs a patched roxygen2, which is a separate decision: it is #250, stacked on top of this chain, and can be taken or left on its own.The chunk hook that normalises the temporary directory was not touched.
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
Generated by Claude Code