Skip to content

docs: Break lines at meaning boundaries - #787

Merged
krlmlr merged 4 commits into
claude/badge-harmonizationfrom
claude/sembr
Sep 13, 2026
Merged

docs: Break lines at meaning boundaries#787
krlmlr merged 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, vignettes/RSQLite.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.

man/ is left to CI

man/ is not part of this pull request. Every commit in the chain leaves the .Rd files byte-identical to main, and CI regenerates and commits them after merge, so what is under review here is the sources alone.

Verification

  • Word-level identity for every file touched: comment markers stripped, whitespace collapsed, compared — nothing reworded, added or dropped.
  • render_readme() run twice — byte-identical output.
  • Every R/*.R still parses. src/cpp11.dd was not touched.

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. That is why an earlier revision of this branch kept sentence pairs joined on one line in @param synchronous, @param flags, @param value, @param append and the dbWriteTable() @details; those joins are undone here, and @param flags now breaks at its semicolons so each item and each sentence starts a line. Restoring the gap needs a patched roxygen2, which is a separate decision: it is #791, 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.

One block still left as it was

@param default.extensions is a sharper case and worth a separate look: the source reads ...on the new connection.Setting this value to \FALSE`` — a missing space after the period. Any break at that sentence boundary would insert a space and so change the rendered help, and every alternative break exceeds 140 columns. It is left exactly as it was; fixing the typo is a content change and does not belong in a reformatting pass.

Generated files are left alone: R/cpp11.R, R/export.R, R/import-standalone-*.R.

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 13, 2026 20:29
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. Line breaks only, no wording
changes.

Where two sentences are separated by two spaces, the pair stays on one
long line: roxygen2 strips leading and trailing whitespace from
continuation lines, so a break at that gap would drop a space from the
rendered help.

The header comment that says README.md and index.md are generated was
wrapped the same way, so its sentences start on their own lines too.
It is copied verbatim into the rendered output, so README.md and
index.md are re-rendered with cynkratemplate::render_readme().

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
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.

The `flags` parameter is no longer one line either: its semicolon list now breaks at the semicolons,
so each item and each sentence starts a line.

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
krlmlr merged commit 29922c4 into main Sep 13, 2026
7 of 11 checks passed
@krlmlr
krlmlr deleted the claude/sembr branch September 13, 2026 21:05
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