Skip to content

docs: Break lines at meaning boundaries - #62

Open
krlmlr wants to merge 4 commits into
claude/badge-harmonizationfrom
claude/sembr
Open

krlmlr wants to merge 4 commits into
claude/badge-harmonizationfrom
claude/sembr

Conversation

@krlmlr

@krlmlr krlmlr commented Sep 13, 2026

Copy link
Copy Markdown
Member

Reformatting only, no wording changes. Prose in README.Rmd 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.

R/import-standalone-purrr.R is left alone — its header reads "Standalone file: do not edit by hand".

Sentence pairs that the source separated with a double space are now broken apart like every other pair, so the convention holds throughout. Earlier revisions of this branch kept them joined on one line, because a break would have dropped the gap from the rendered help; that is no longer a reason to make an exception, for the reason in the next-but-one paragraph.

man/ is not edited by hand in this pull request. The regenerated .Rd files are generated output, and CI roxygenises and commits them itself, so they arrive on this branch as an automated commit rather than in the hand-written diff.

One consequence is worth stating 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 krlmlr#4, 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.

This PR was missing from the chain. #61 already targeted this branch, but nothing represented the branch itself — so the goals PR sat on top of an unrepresented link. Found while auditing that every stacked PR targets its predecessor rather than main.

The branch was rebuilt on the krlmlr fork while the work continued. Rather than force-pushing over the published history here, the rebuilt branch was brought in as a merge, so this branch only ever moved forward. The resulting tree is exactly the rebuilt one.

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

krlmlr and others added 4 commits September 14, 2026 05:58
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, and the sentence after it, must
each begin at the start of a line. The maintainer note at the top of
README.Rmd was still wrapped to a fixed width, so two sentences started
mid-line; README.md and index.md are re-rendered from it.

Line breaks only, no wording changes. The note is the only offender the
detector finds in this repository, and it carries no roxygen prose, so
man/*.Rd is untouched and the rendered help is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Continuation lines in roxygen paragraphs now carry two spaces after the
comment marker instead of one, and the first line of a paragraph carries
exactly one, so the source shows at a glance where a paragraph starts and
where it merely continues.

The rendered help is unchanged: this package enables markdown in roxygen2,
which strips leading whitespace from continuation lines before the .Rd is
written.

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.

`man/` is unaffected by the indent either way.
Reverting rather than substituting also restores the paragraph and tag alignment that the indent pass changed along the way.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant