Skip to content

Commit

Permalink
get rid of xfun::attr(): yihui/xfun#96
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Jan 6, 2025
1 parent 4510c09 commit 35308a2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: knitr
Type: Package
Title: A General-Purpose Package for Dynamic Report Generation in R
Version: 1.49.1
Version: 1.49.2
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("Abhraneel", "Sarma", role = "ctb"),
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ import(grDevices)
import(graphics)
import(stats)
import(utils)
importFrom(xfun,attr)
importFrom(xfun,file_ext)
importFrom(xfun,file_string)
importFrom(xfun,html_escape)
Expand Down
2 changes: 1 addition & 1 deletion R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' \code{knit} + \code{R} (while \code{Sweave} = \code{S} + \code{weave}).
#' @references Full documentation and demos: \url{https://yihui.org/knitr/};
#' FAQ's: \url{https://yihui.org/knitr/faq/}
#' @importFrom xfun attr file_ext html_escape is_windows loadable parse_only
#' @importFrom xfun file_ext html_escape is_windows loadable parse_only
#' sans_ext try_silent with_ext read_utf8 write_utf8 file_string
#' is_R_CMD_check is_abs_path
'_PACKAGE'
Expand Down
3 changes: 3 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ comment_to_var = function(x, varname, pattern, envir) {
is_blank = function(x) {
if (length(x)) all(grepl('^\\s*$', x)) else TRUE
}

attr = function(...) base::attr(..., exact = TRUE)

valid_path = function(prefix, label) {
if (length(prefix) == 0L || is.na(prefix) || prefix == 'NA') prefix = ''
paste0(prefix, label)
Expand Down
1 change: 1 addition & 0 deletions knitr.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: aebca7ed-54a0-42eb-85a8-80428da985f9

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down

0 comments on commit 35308a2

Please sign in to comment.