When I try to use
@inheritDotParams glue::glue_data
and I devtools::check(pkg)
throws a warning about unknown macro \item
. I think it's a problem with either how devtools::document()
builds it or how tools::parse_Rd()
and pkgdown::build_reference()
parse it.
I looks to be an issue in this section re: .open
and .close
.
It looks like this for me (my Rd file)
And this for glue
(their Rd file)
Any help would be appreciated.
# create tmp package
tmp <- tempdir()
pkg <- file.path(tmp, "test")
devtools::create(path = pkg)
# add R code
writeLines(
con = file.path(pkg, "R/test.R"),
text =
"#' does some stuff
#' @inheritDotParams glue::glue_data
foo <- function(...) glue_data(...)"
)
# document is ok
devtools::document(pkg)
# warning: prepare_Rd: ./man/foo.Rd:20: unknown macro '\item'
devtools::check(pkg)
# also throws warning
pkgdown::build_reference(pkg)
# In tools::parse_Rd(path, macros = macros, encoding = "UTF-8") :
# C:/Users/jake/AppData/Local/Temp/RtmpYxG5C2/test/man/foo.Rd:20: unknown macro '\item'
# remove temp directory
unlink(tmp, recursive = TRUE)