File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -915,8 +915,19 @@ include_layer_in_guide <- function(layer, matched) {
915915validate_guide <- function (guide ) {
916916 # if guide is specified by character, then find the corresponding guide
917917 if (is.character(guide )) {
918- fun <- find_global(paste0(" guide_" , guide ), env = global_env(),
919- mode = " function" )
918+ check_string(guide , allow_empty = FALSE )
919+ search_env <- list (global_env())
920+ if (isTRUE(grepl(" ::" , guide ))) {
921+ # Append prefix as namespaces to search environments
922+ prefix <- sub(" ::.*" , " " , guide )
923+ search_env <- c(search_env , list (asNamespace(prefix )))
924+ # Remove prefix from guide name
925+ guide <- sub(" .*::" , " " , guide )
926+ }
927+ fun <- find_global(
928+ paste0(" guide_" , guide ),
929+ env = search_env , mode = " function"
930+ )
920931 if (is.function(fun )) {
921932 guide <- fun()
922933 }
You can’t perform that action at this time.
0 commit comments