Skip to content

Commit

Permalink
fix: better detect functions - fix #63
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Nov 11, 2024
1 parent bb5ccea commit 9c9daaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/get_all_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ get_all_functions <- function() {

## Extract function names ----

x <- lapply(x, function(x) x[grep(" <- function\\(", x)])
x <- lapply(x, function(x) x[grep("\\s{0,}(<-|=)\\s{0,}function\\s{0,}\\(",
x)])
x <- lapply(x, function(x) gsub("\\s{0,}(<-|=)\\s{0,}function.*", "", x))

x <- unlist(x)
Expand Down

0 comments on commit 9c9daaa

Please sign in to comment.