From f7f928202cd77e8f9300e4fd3b8c2a5831f856e9 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 27 May 2026 13:33:34 -0700 Subject: [PATCH 1/3] Skip CRLF test when markdown package is not installed The CRLF test calls includeMarkdown(), which requires the Suggests-only markdown package. Skip the test in environments where it isn't available (e.g. the depends-only GHA check). --- tests/testthat/test-print.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-print.R b/tests/testthat/test-print.R index 3239dbf6..f37ee644 100644 --- a/tests/testthat/test-print.R +++ b/tests/testthat/test-print.R @@ -19,6 +19,7 @@ test_that("print.html preserves dependencies for HTML()", { }) test_that("CRLF is properly handled", { + skip_if_not_installed("markdown") txt <- paste(c("x", "y", ""), collapse = "\r\n") tmp <- tempfile(fileext = ".txt") From 25b2ed2af106bcb25057219d9807450afcef063a Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 27 May 2026 13:33:37 -0700 Subject: [PATCH 2/3] devtools::document() with roxygen2 8.0.0 --- DESCRIPTION | 2 +- man/capturePlot.Rd | 2 +- man/defaultPngDevice.Rd | 2 +- man/htmltools-package.Rd | 1 + man/plotTag.Rd | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index be6e3979..95fd6abe 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -39,9 +39,9 @@ Enhances: knitr Config/Needs/check: knitr Config/Needs/website: rstudio/quillt, bench +Config/roxygen2/version: 8.0.0 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.3 Collate: 'colors.R' 'fill.R' diff --git a/man/capturePlot.Rd b/man/capturePlot.Rd index 8977e323..074b2a1b 100644 --- a/man/capturePlot.Rd +++ b/man/capturePlot.Rd @@ -24,7 +24,7 @@ extension will be used; you should provide a filename with a different extension if you provide a non-PNG graphics device function.} \item{device}{A graphics device function; by default, this will be either -\code{\link[grDevices:png]{grDevices::png()}}, \code{\link[ragg:agg_png]{ragg::agg_png()}}, or \code{\link[Cairo:Cairo]{Cairo::CairoPNG()}}, depending on +\code{\link[grDevices:png]{grDevices::png()}}, \code{\link[ragg:agg_png]{ragg::agg_png()}}, or \code{\link[Cairo:CairoPNG]{Cairo::CairoPNG()}}, depending on your system and configuration. See \code{\link[=defaultPngDevice]{defaultPngDevice()}}.} \item{width, height, res, ...}{Additional arguments to the \code{device} function.} diff --git a/man/defaultPngDevice.Rd b/man/defaultPngDevice.Rd index e6365a64..4f6c2139 100644 --- a/man/defaultPngDevice.Rd +++ b/man/defaultPngDevice.Rd @@ -14,7 +14,7 @@ Returns the best PNG-based graphics device for your system, in the opinion of the \code{htmltools} maintainers. On Mac, \code{\link[grDevices:png]{grDevices::png()}} is used; on all other platforms, either \code{\link[ragg:agg_png]{ragg::agg_png()}} or -\code{\link[Cairo:Cairo]{Cairo::CairoPNG()}} are used if their packages +\code{\link[Cairo:CairoPNG]{Cairo::CairoPNG()}} are used if their packages are installed. Otherwise, \code{\link[grDevices:png]{grDevices::png()}} is used. } diff --git a/man/htmltools-package.Rd b/man/htmltools-package.Rd index c651ae5a..a74247eb 100644 --- a/man/htmltools-package.Rd +++ b/man/htmltools-package.Rd @@ -24,6 +24,7 @@ Useful links: Authors: \itemize{ + \item Carson Sievert \email{carson@posit.co} (\href{https://orcid.org/0000-0002-4958-2844}{ORCID}) \item Joe Cheng \email{joe@posit.co} \item Barret Schloerke \email{barret@posit.co} (\href{https://orcid.org/0000-0001-9986-114X}{ORCID}) \item Winston Chang \email{winston@posit.co} (\href{https://orcid.org/0000-0002-1576-2126}{ORCID}) diff --git a/man/plotTag.Rd b/man/plotTag.Rd index 90041bcb..dd514319 100644 --- a/man/plotTag.Rd +++ b/man/plotTag.Rd @@ -26,7 +26,7 @@ of the image. This is used by accessibility tools, such as screen readers for vision impaired users.} \item{device}{A graphics device function; by default, this will be either -\code{\link[grDevices:png]{grDevices::png()}}, \code{\link[ragg:agg_png]{ragg::agg_png()}}, or \code{\link[Cairo:Cairo]{Cairo::CairoPNG()}}, depending on +\code{\link[grDevices:png]{grDevices::png()}}, \code{\link[ragg:agg_png]{ragg::agg_png()}}, or \code{\link[Cairo:CairoPNG]{Cairo::CairoPNG()}}, depending on your system and configuration. See \code{\link[=defaultPngDevice]{defaultPngDevice()}}.} \item{width, height}{The width/height that the generated tag should be @@ -35,7 +35,7 @@ displayed at, in logical (browser) pixels.} \item{pixelratio}{Indicates the ratio between physical and logical units of length. For PNGs that may be displayed on high-DPI screens, use \code{2}; for graphics devices that express width/height in inches (like -\code{\link[grDevices:cairo]{grDevices::svg()}}, try \code{1/72} or \code{1/96}.} +\code{\link[grDevices:svg]{grDevices::svg()}}, try \code{1/72} or \code{1/96}.} \item{mimeType}{The MIME type associated with the \code{device}. Examples are \code{image/png}, \code{image/tiff}, \code{image/svg+xml}.} From 4093ff10a2b1c375b44e4ae624a4fff28bfa9a31 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 27 May 2026 13:38:57 -0700 Subject: [PATCH 3/3] Guard withr use in tagFunction example The depends-only R CMD check installs only Depends/Imports, so the example errored with 'no package called withr'. Wrap the withr::with_options() call in requireNamespace("withr") so the example runs when the Suggested package is available and is skipped otherwise. --- R/tags.R | 4 +++- man/tagFunction.Rd | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/tags.R b/R/tags.R index 8848b393..f8421384 100644 --- a/R/tags.R +++ b/R/tags.R @@ -299,7 +299,9 @@ tagList <- function(...) { #' }) #' myDiv <- attachDependencies(div(), myDivDep) #' renderTags(myDiv) -#' withr::with_options(list(useDep = FALSE), renderTags(myDiv)) +#' if (requireNamespace("withr", quietly = TRUE)) { +#' withr::with_options(list(useDep = FALSE), renderTags(myDiv)) +#' } #' tagFunction <- function(func) { if (!is.function(func) || length(formals(func)) != 0) { diff --git a/man/tagFunction.Rd b/man/tagFunction.Rd index 2b480795..568e585f 100644 --- a/man/tagFunction.Rd +++ b/man/tagFunction.Rd @@ -28,7 +28,9 @@ myDivDep <- tagFunction(function() { }) myDiv <- attachDependencies(div(), myDivDep) renderTags(myDiv) -withr::with_options(list(useDep = FALSE), renderTags(myDiv)) +if (requireNamespace("withr", quietly = TRUE)) { + withr::with_options(list(useDep = FALSE), renderTags(myDiv)) +} } \seealso{