Skip to content

Commit

Permalink
Merge pull request #286 from carpentries/update-downlit-shim
Browse files Browse the repository at this point in the history
Update downlit shim
  • Loading branch information
zkamvar authored May 16, 2022
2 parents ba7ee3d + a46aa31 commit d513e17
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 26 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sandpaper
Title: Create and Curate Carpentries Lessons
Version: 0.5.1
Version: 0.5.2
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down Expand Up @@ -64,7 +64,7 @@ LazyData: true
Config/testthat/edition: 3
Config/testthat/parallel: false
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
URL: https://github.com/carpentries/sandpaper/
BugReports: https://github.com/carpentries/sandpaper/issues/
VignetteBuilder: knitr
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# sandpaper 0.5.2

TEMPORARY BUG FIX
-----------------

* {downlit} shim has been updated to no longer fail when parsing BASH globs.
(see https://github.com/r-lib/downlit/pull/138)


# sandpaper 0.5.1

NEW FEATURES
Expand Down
3 changes: 2 additions & 1 deletion R/build_site.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ build_site <- function(path = ".", quiet = !interactive(), preview = TRUE, overr
sidebar <- create_sidebar(c(fs::path(built_path, "index.md"), chapters))
# shim for downlit ----------------------------------------------------------
shimstem_file <- system.file("pkgdown", "shim.R", package = "sandpaper")
expected <- "5484c37e9b9c324361d775a10dea4946"
# expected <- "5484c37e9b9c324361d775a10dea4946"
expected <- "8808c462f326fea560ed2d748ad459e5"
actual <- tools::md5sum(shimstem_file)
if (expected == actual) {
# evaluate the shim in our namespace
Expand Down
4 changes: 2 additions & 2 deletions R/utils-varnish.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
varnish_vars <- function() {
ver <- function(pak) glue::glue(" ({packageVersion(pak)})")
ver <- function(pak) glue::glue(" ({utils::packageVersion(pak)})")
cfg <- function(pkg) {
desc <- packageDescription(pkg)
desc <- utils::packageDescription(pkg)
url <- desc[["RemoteUrl"]]
ref <- desc[["RemoteRef"]] %||% "HEAD" # if there is no ref, default to HEAD
vsn <- desc[["Version"]]
Expand Down
4 changes: 4 additions & 0 deletions inst/pkgdown/shim.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# before loading, so if someone decides to change this shim, it will not run.
dl <- asNamespace("downlit")
tr <- dl$token_href
ht <- dl$href_topic
unlockBinding("token_href", dl)
unlockBinding("href_topic", dl)
dl$token_href <- function(token, text) rep(NA, length(token))
dl$href_topic <- function(topic, package) NA_character_
parse(text = "{\ndl$token_href <- tr\nlockBinding('token_href', dl)\n}")
parse(text = "{\ndl$href_topic <- ht\nlockBinding('href_topic', dl)\n}")
3 changes: 0 additions & 3 deletions man/create_sidebar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/get_content.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/git_worktree_setup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/sandpaper-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/sandpaper.options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 28 additions & 12 deletions man/yaml_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d513e17

Please sign in to comment.