From 64d9cb29c352ae3c9e530ef11c62378b6974d583 Mon Sep 17 00:00:00 2001 From: m7pr Date: Tue, 14 May 2024 11:22:46 +0200 Subject: [PATCH] fix situation where the code has length > 1 --- R/utils-get_code_dependency.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils-get_code_dependency.R b/R/utils-get_code_dependency.R index c76c49828..48fe6b122 100644 --- a/R/utils-get_code_dependency.R +++ b/R/utils-get_code_dependency.R @@ -35,7 +35,7 @@ get_code_dependency <- function(code, names, check_names = TRUE) { # If code is bound in curly brackets, remove them. tcode <- trimws(code) - if (grepl("^\\{.*\\}$", tcode)) { + if (any(grepl("^\\{.*\\}$", tcode))) { code <- sub("^\\{(.*)\\}$", "\\1", tcode) }