-
Notifications
You must be signed in to change notification settings - Fork 13
Description
When using any att_from_* function on a script containing double colons, it identifies packages that aren't packages.
This subsequently breaks any combination with att_to_desc_from_is or similar utility function.
Examples with an xpath using xml2 library :
xml_find_all(ttt, "//tr/th[@id='r6']/following-sibling::td") #att_from_rmd will return `sibling` as a package...Example with a comment :
filter(df, value > 5) #this is not base::Filter ! <- will return base as a packageI believe the cause of this unwanted behaviour is the regex in att_from_rscripts.R :
str_extract_all("[[:alnum:]\\.]+(?=::)") %>%
The regex doesn't seem check the context around supposed "package" as you can see this playground
It should be possible to either build a cryptic regex checking if you are within parentheses or comment, or remove comments and quotes with gsub beforehand.
In either cases this might lose support for libraries called within string interpolation such as glue("Value : {data.table::fifelse(myvar, 1,2)}