Conversation
commonmark discards the whitespace a line break stands for, so roxygen prose written one sentence per line loses the gap between sentences in the rendered help. Only the text renderer is affected, which is what `?topic` shows. A new composite action installs roxygen2 from upstream with the R/ part of krlmlr/roxygen2@f-sentence-spacing applied on top, and runs just before the Roxygenize step. It shallow-clones upstream, fetches the branch, applies the diff restricted to R/ so conflicts in the test files cannot fail it, and aborts rather than silently installing an unpatched build. It then asserts that what it installed really carries the patch. Config/roxygen2/version becomes 8.1.0.9100. The .9100 suffix distinguishes a patched build from upstream's own .9000 development builds; if upstream moves, the x.y.z part follows it and the suffix stays. DESCRIPTION is DCF and cannot carry a comment, so the explanation lives in a Config/cynkra/roxygen2 field. This is a separate decision from the line-break reformatting below it, and is kept in its own pull request so it can be taken or left on its own. Without it, the reformatting simply renders as it does today, with one space between sentences. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
This was referenced Sep 13, 2026
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.
Superseded by #67, which is the same branch opened with its head in this repository so that it can join the pull request stack. Continue there.
Top of the documentation chain, on top of #61. This existed only as krlmlr#4, in the fork, where reviewers here could not see it; this is the same branch, opened against
r-libso the whole stack is reviewable in one place. The fork pull request is now redundant.The problem
commonmark discards the whitespace a line break stands for. roxygen2 turns every softbreak into a bare newline, so the
.Rdcarries a line break with nothing after it andRd2txt()renders it as a single space. Prose written one sentence per line therefore comes out single-spaced, while the same words wrapped to a fixed width with two spaces after the period keep the gap.Only the text renderer is affected.
Rd2HTML()andRd2latex()differ by whitespace that HTML and TeX collapse, and LaTeX applies its own sentence spacing regardless. But text is what?topicshows.For this package the effect is small and worth stating plainly:
R/carried no double-spaced sentence pairs at all, and the one inREADME.Rmdis markdown rather than rendered help. So this does not restore a gap the author wrote here — it introduces two-space sentence spacing in the rendered help, consistently with the rest of the fleet.The change
A composite action,
.github/workflows/roxygen2-fork, installs roxygen2 from upstream with theR/part ofkrlmlr/roxygen2@f-sentence-spacingapplied on top, andR-CMD-check.yamlruns it immediately before the Roxygenize step. It shallow-clones upstream, fetches the branch, computes the diff against their merge base restricted toR/, and applies it withgit apply --3way. Restricting toR/means an unrelated upstream change to a test fixture cannot fail the documentation step.Config/roxygen2/versionbecomes8.1.0.9100. The.9100suffix distinguishes a patched build from upstream's own.9000development builds.DESCRIPTIONis DCF and cannot carry a comment line, so the explanation lives in aConfig/cynkra/roxygen2field.Known defects, not yet fixed
This is filed for review, not for merging as it stands. A review round across the fleet found two blocking problems in this action, both of which apply here:
"\1"as a regex backreference. In R that is the octal escape for\001, soDESCRIPTIONgets a malformed version andR CMD INSTALLaborts. Confirmed by real CI runs in three other repositories.continue-on-error: trueand no entry in theCHECKSsummary, contrary to the stated invariant of the block it sits in, so a failure takes down R CMD check and pkgdown with it and the summary reports nothing.Both fixes are known; they are being handled as a fleet-wide pass rather than repo by repo.
Upstream
The roxygen2 side is
krlmlr/roxygen2#8, on a fork, not yet filed with r-lib. It is deliberately narrow — one line inR/markdown.Rplus a newR/sentence-spacing.R— with three guards: an abbreviation list, a single-letter-initial guard soM.E.J.beforeNewmandoes not gain a gap mid-name, and a fix for a determinism bug where a line starting with\doi{}or\code{}gained or lost its gap at random, because the test was reading roxygen2's own random placeholder for protected Rd tags.🤖 Generated with Claude Code
https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Generated by Claude Code