From 6010aa38bb0a36531749b092a6a18b284aa66b7a Mon Sep 17 00:00:00 2001 From: Yunuuuu Date: Wed, 2 Jul 2025 17:30:02 +0800 Subject: [PATCH] fix: correct Rd link syntax for aesthetics roxygen2 tag --- R/utilities-help.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utilities-help.R b/R/utilities-help.R index fd008e09f2..d0c0a15576 100644 --- a/R/utilities-help.R +++ b/R/utilities-help.R @@ -78,7 +78,7 @@ rd_match_docpage <- function(aes) { )[index + 1] no_match <- index == 0 docpage[!no_match] <- paste0( - "\\link[=ggplot2::", docpage[!no_match], + "\\link[ggplot2:", docpage[!no_match], "]{", flat[!no_match], "}" ) docpage[no_match] <- flat[no_match] @@ -195,7 +195,7 @@ roxy_tag_parse.roxy_tag_aesthetics <- function(x) { roxy_tag_rd.roxy_tag_aesthetics <- function(x, base_path, env) { # When we document ggplot2 itself, we don't need to prefix links with ggplot2 if (basename(base_path) == "ggplot2") { - x$val <- gsub("\\link[=ggplot2::", "\\link[=", x$val, fixed = TRUE) + x$val <- gsub("\\link[ggplot2:", "\\link[=", x$val, fixed = TRUE) } roxygen2::rd_section("aesthetics", x$val) }