Skip to content

Commit

Permalink
fix situation where the code has length > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed May 14, 2024
1 parent c0d8065 commit 64d9cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils-get_code_dependency.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 64d9cb2

Please sign in to comment.