Repository navigation
docs: render the roxygen markdown the reference pages are written in - #6
Conversation
The roxygen comments use markdown (**bold**, `code`, [cog_x()] links, bullet lists) but DESCRIPTION had no `Roxygen: list(markdown = TRUE)`, so the generated .Rd files carried that syntax literally. It also meant a bare `%` started an Rd comment and silently cut the rest of its line from seven places in the rendered pages, including "7% of the no-filter floor", "-32.7% to +251.0% across 24 years" and the `filter(role %in% ...)` line of cog_peer_compare()'s example. Adds the setting and regenerates man/ with roxygen2 7.3.3 (matching RoxygenNote). The only source change is escaping one literal "[min year, max year]" in an @nord block in R/balance_caveats.R, which markdown mode otherwise reads as a link. No wording or code changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5
|
Thanks for this — and one thing worth knowing before it happens. This repository is a mirror. Development happens on Gitea at Because that merge preserves your commits at their original SHAs, GitHub will
If it is not going to be merged, you will get an actual reply saying so. Substantial contributions get a Full details: CONTRIBUTING.md. |
No Gitea issue yet; the maintainer may file one.
What changed
The roxygen comments are written in markdown (
**bold**, backticks,[cog_x()]links, bullet lists), butDESCRIPTIONhad noRoxygen: list(markdown = TRUE), so every.Rdfile carried that syntax literally.DESCRIPTION: addsRoxygen: list(markdown = TRUE), placed aboveRoxygenNote.RoxygenNoteitself is unchanged.man/: regenerated with roxygen2 7.3.3, which matchesRoxygenNote. 16.Rdfiles changed, which is every page inman/.R/balance_caveats.R: one roxygen line, escaping literal brackets (details below).18 files in total. No code changed. No
.Rdfile was edited by hand.Wording I had to alter
None. The one roxygen source change is an escape, not a wording change:
R/balance_caveats.R:56:[min year, max year]→\[min year, max year\]. Markdown mode read the brackets as a link to a topic named "min year, max year" and warned. That block is@noRd, so no page shows it either way.One side effect is worth knowing about. Text that was silently missing from the rendered pages is now there. Without markdown mode, a bare
%starts an Rd comment, so the rest of its line was dropped. Markdown mode escapes it (\%), which restores 11 truncated lines across six pages, coming from six roxygen lines:cog_spending,cog_revenue,cog_balances: "7**% of the no-filter floor.**"cog_fiscal_periods,cog_survey_year: "99**% of its government-years have no usable**", "5**% to 11% in FY1978**", "3**% in every other year.**"cog_peer_compare: "−32.7**% to +251.0% across 24 years on**"; and in the code example,filter(role %in% c("target", "peer")) |>had everything from%in%on cut.The commit message says "seven places". The correct count is the 11 lines above. I tried to amend the message before opening this PR, but the sandbox refused the force-push, so the commit message stands as pushed.
How I reviewed every changed page
Rendered-text diff. Each old and new
.Rdwent throughtools::Rd2txt(), and I diffed the words after ignoring the characters markdown consumes (backticks,*, brackets, quote styles). All 42 differing runs are explained:%restorations above;*word*now rendering as emphasis;L--keeping its two hyphens instead of becoming a dash;No word was lost, and no stray link appeared.
Raw
.Rdread. I read every added line of all 16 pages, about 700 lines.**,](or[cog_remain.\linktargets exist.\itemizeblocks, one\enumerate(the intended four-step list incog_gov_search), one\preformattedblock (cog_peer_compare's example), 37\strongand 6\emph.R/fiscal.R:218begins a wrapped line with "30)". Markdown only starts a list mid-paragraph at 1, so no list was created.#59);line start incog_spendingis neither a heading nor an Rd directive.tools::checkRd()on all 16 new files: no findings apart from the existing non-ASCII notes.DESCRIPTIONdeclaresEncoding: UTF-8, soR CMD checkraises no notes for them.Pages I did not read: none. All 16 pages in
man/changed, and I read all of them.Checks
@noRd must not be followed by any textatR/manifest.R:130andR/views.R:124. The bracket warning is fixed.R CMD build --no-manual+R CMD check --no-manual: every Rd check reports OK, the same as before ("Rd files", "Rd metadata", "Rd cross-references", "missing documentation entries", "code/documentation mismatches", "Rd \usage sections", "Rd contents"). No new Rd warnings. Overall status is 1 WARNING and 2 NOTEs, unchanged frommain:en_US.UTF-8locale..roborev.tomlis a hidden file.pkgdown::check_pkgdown(): no problems found.pkgdown::build_reference(examples = FALSE)in a scratch copy: all reference pages build. The HTML shows real<strong>and linkedcog_find_peers(), and no literal**.test-peer-summary-scope.R, which asserts text inman/cog_peer_compare.Rd, still passes.extensions.duckdb.org, so checks and tests ran on a scratch copy withcog_open()'sINSTALL httpfs; LOAD httpfs;line removed. That is not in the commit.Not verified
pkgdown::build_site()or view the hosted reference pages.🤖 Generated with Claude Code
https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5