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 d1ab0de commit 17284db
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: blogdown
Title: Create Blogs and Websites with R Markdown
Version: 1.19.1
Version: 1.19.2
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person("Christophe", "Dervieux", role = "aut", email = "[email protected]", comment = c(ORCID = "0000-0003-4474-2498")),
Expand Down Expand Up @@ -66,5 +66,5 @@ Suggests:
whoami
Config/Needs/website: pkgdown, tidyverse/tidytemplate, rstudio/quillt, rstudio/webshot2
Encoding: UTF-8
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
SystemRequirements: Hugo (<https://gohugo.io>) and Pandoc (<https://pandoc.org>)
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export(write_toml)
export(yaml2toml)
import(stats)
import(utils)
importFrom(xfun,attr)
importFrom(xfun,del_empty_dir)
importFrom(xfun,dir_create)
importFrom(xfun,dir_exists)
Expand Down
2 changes: 1 addition & 1 deletion R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @aliases blogdown-package
#' @import utils
#' @import stats
#' @importFrom xfun attr in_dir read_utf8 write_utf8 is_windows is_macos
#' @importFrom xfun in_dir read_utf8 write_utf8 is_windows is_macos
#' file_exists dir_exists file_ext msg_cat dir_create del_empty_dir proc_kill
#' set_envvar exit_call existing_files
#' @examples if (interactive()) blogdown::new_site()
Expand Down
4 changes: 2 additions & 2 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ build_one = function(input, output, to_md = file_ext(output) != 'html', quiet =
}

process_markdown = function(res, x = read_utf8(res)) {
unlink(xfun::attr(res, 'intermediates'))
unlink(attr(res, 'intermediates'))
# write HTML dependencies to the body of Markdown
if (length(meta <- xfun::attr(res, 'knit_meta'))) {
if (length(meta <- attr(res, 'knit_meta'))) {
m = rmarkdown:::html_dependencies_as_string(meta, attr(res, 'files_dir'), '.')
if (length(i <- grep('^---\\s*$', x)) >= 2) {
x = append(x, m, i[2])
Expand Down
2 changes: 2 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pkg_file = function(..., mustWork = TRUE) {
system.file(..., package = 'blogdown', mustWork = mustWork)
}

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

# tempfile under the current working directory
wd_tempfile = function(..., pattern = '') {
basename(tempfile(pattern, '.', ...))
Expand Down
1 change: 1 addition & 0 deletions blogdown.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 7de02ffc-a200-4611-bc07-18b265ee1be3

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down

0 comments on commit 17284db

Please sign in to comment.