docs: Break lines at meaning boundaries - #873
Open
krlmlr wants to merge 4 commits into
Open
Conversation
This was referenced Sep 13, 2026
krlmlr
force-pushed
the
claude/sembr-2
branch
2 times, most recently
from
September 13, 2026 18:41
5198d23 to
adc445b
Compare
krlmlr
force-pushed
the
claude/sembr-2
branch
from
September 13, 2026 20:37
adc445b to
cd07125
Compare
krlmlr
force-pushed
the
claude/sembr-2
branch
from
September 13, 2026 21:16
cd07125 to
0175d77
Compare
krlmlr
added this pull request to stack #876
September 13, 2026 21:27
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
Continuation lines of a roxygen paragraph now carry two spaces after the `#'` marker instead of one. The first line of a paragraph and every tag line keep their single space, so the indent marks exactly where a line break continues a paragraph. The point of the indent is that `Rd2txt()` renders a line break followed by indentation as two spaces and a bare line break as one, so a sentence gap survives being broken across lines. This package sets `Roxygen: list(markdown = TRUE)`, and roxygen2 strips the leading whitespace of a continuation line during the commonmark parse, so here the indent reaches the source only: `man/*.Rd` is byte-identical and so is the rendered help. No line was joined or broken in this commit. 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`. pillar 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. 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. 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-2
branch
from
September 13, 2026 21:28
0175d77 to
7df9e15
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.
Supersedes #869, re-cut so it stacks on #872.
Reformatting only, no wording changes. Prose in
README.Rmd, two of the five 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.
Verification
tools::Rd2txt()over all 36 topics — byte-identical.R/was checked mechanically to be a comment line, so no code moved.debugme,digitsandnumbersneeded nothing — already conforming.Re-rendering this branch after the rebase onto #872 produced zero changes.
man/is left to CIman/*.Rdis not committed here. roxygen2 passes source line breaks 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 once this merges.man/therefore ends this branch byte-identical tomain, which is what keeps this diff prose only rather than twice its size.Left alone
clean_output()chunk hook, including thedataframe_N_Nand___row_numbersuppressions.R/compat-lifecycle.R,R/compat-purrr.R,R/register-s3.R.R/options.Rwheredefault: 20.anddefault: 3.are followed by two spaces.Rd2txt()renders that literally, so breaking at those sentence boundaries collapsed it and failed the check; the bullets were rebroken at the preceding comma instead, leaving the double space mid-line.The continuation indent is added and taken back out
The second commit gave every continuation line of a roxygen paragraph a second space after the
#'marker, and the third commit reverts it. The net effect of this PR is the line-breaking described above and nothing else.The indent never reached the
.Rd. This package setsRoxygen: list(markdown = TRUE), and roxygen2 strips the leading whitespace of a continuation line during the commonmark parse, soman/andNAMESPACEcame back byte-identical with the indent and without it.The third commit is a
git revertrather than a substitution, because the indent pass had also normalised pre-existing three-space tag continuations down to two and those have to go back to three.git diffbetween the commit before the indent and the branch tip is empty. TheR/options.Rpair above is untouched throughout, and no line is joined or broken by either of the two commits.The sentence gap
A line break which follows the end of a sentence currently renders as one space rather than 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 #875, stacked on top of this chain, and can be taken or left on its own. Without it this change simply renders as the package renders today, and the long joined lines stay as they are.
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