Skip to content

Commit

Permalink
code note
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Mar 1, 2025
1 parent b5c429b commit 1a91edd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/utils-rd.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ rd_gg_aesthetics <- function(...) {
rd_collect_family <- function(family,
section_title = paste(family, "family"),
code_style = TRUE) {
# get blocks objects from the draw function
# get blocks objects from the roxygenize function
blocks <- NULL
pos <- sys.nframe()
while (pos > 0L) {
if (!is.null(call <- sys.call(-pos))) {
fn <- eval(.subset2(call, 1L), sys.frame(-(pos + 1L)))
env <- sys.frame(-pos)
if (identical(fn, getFromNamespace("roxygenise", "roxygen2")) &&
if (identical(fn, getFromNamespace("roxygenize", "roxygen2")) &&
exists("blocks", envir = env, inherits = FALSE)) {
blocks <- get("blocks", envir = env, inherits = FALSE)
break
Expand Down

0 comments on commit 1a91edd

Please sign in to comment.