Skip to content

Commit 0afef83

Browse files
committed
extract_calls do not drop @linksto tags
1 parent 930503f commit 0afef83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/utils-get_code_dependency.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ find_call <- function(call_pd, text) {
110110
#' @noRd
111111
extract_calls <- function(pd) {
112112
calls <- lapply(
113-
pd[pd$parent == 0 & pd$token != "COMMENT", "id"],
113+
pd[pd$parent == 0 & (pd$token != "COMMENT" | grepl("@linksto", pd$text, fixed = TRUE)), "id"],
114114
function(parent) {
115115
rbind(
116116
pd[pd$id == parent, ],
@@ -120,6 +120,7 @@ extract_calls <- function(pd) {
120120
)
121121
calls <- Filter(function(call) !(nrow(call) == 1 && call$token == "';'"), calls)
122122
calls <- Filter(Negate(is.null), calls)
123+
calls <- fix_shifted_comments(calls)
123124
fix_arrows(calls)
124125
}
125126

0 commit comments

Comments
 (0)