Skip to content

Commit

Permalink
update footnote blarghing
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar committed Feb 23, 2022
1 parent b23c3be commit f216ac4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pegboard
Title: Explore and Manipulate Markdown Curricula from the Carpentries
Version: 0.2.2
Version: 0.2.3
Authors@R:c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down
17 changes: 12 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# pegboard 0.2.3

## BUG FIX

- footnotes with no trailing newline are no longer accidentally appended with
relative link anchors when `getOption('sandpaper.links')` is not NULL.

# pegboard 0.2.2

## NEW FEATURES

- If `getOption("sandpaper.links")` is not NULL (in the context of a {sandpaper}
lesson) and is a valid file, it will be appended to any file read in via
`Episode$new()`
- `$validate_links()` no longer throws warnings about short or uninformative
text for link anchors (@zkamvar, #81)

# pegboard 0.2.1
## BUG FIX

- External links files are now appended if the `sandpaper.links` option is set
to a valid file.
- `$validate_links()` no longer throws warnings about short or uninformative
text for link anchors (@zkamvar, #81)

# pegboard 0.2.1

Expand Down
1 change: 1 addition & 0 deletions R/Episode.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Episode <- R6::R6Class("Episode",
# if we have links, we concatenate our input files
tmpin <- tempfile(fileext = ".md")
fs::file_copy(path, tmpin)
cat("\n", append = TRUE, file = tmpin)
file.append(tmpin, links)
path <- tmpin
on.exit(unlink(tmpin), add = TRUE)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-Episode.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ test_that("Episodes from sandpaper will have links included", {

tnk <- withr::local_tempfile()
tep <- withr::local_tempfile()
writeLines("What [is this][link]?\n", tep)
writeLines("<!--comment-->\n\n[link]: https://example.com/link", tnk)
writeLines("What[^1] [is this][link]?\n[^1]: foot", tep)
writeLines("[link]: https://example.com/link", tnk)
e <- Episode$new(tep, fix_links = FALSE)
expect_length(e$links, 0L)
withr::local_options(list(sandpaper.links = tnk))
Expand Down

0 comments on commit f216ac4

Please sign in to comment.