Skip to content

Commit 99c701a

Browse files
Add pos.it to acceptable shortlinks for use_course (r-lib#2040)
1 parent 0e20668 commit 99c701a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

R/course.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#'
1414
#' * GitHub repo spec: "OWNER/REPO". Equivalent to
1515
#' `https://github.com/OWNER/REPO/DEFAULT_BRANCH.zip`.
16-
#' * bit.ly or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz" or "rstd.io/foofy".
16+
#' * bit.ly, pos.it, or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz", "pos.it/foofy" or "rstd.io/foofy".
1717
#' The instructor must then arrange for the shortlink to point to a valid
1818
#' download URL for the target ZIP file. The helper
1919
#' [create_download_url()] helps to create such URLs for GitHub, DropBox,
@@ -492,7 +492,7 @@ normalize_url <- function(url) {
492492
}
493493

494494
is_shortlink <- function(url) {
495-
shortlink_hosts <- c("rstd\\.io", "bit\\.ly")
495+
shortlink_hosts <- c("rstd\\.io", "bit\\.ly", "pos\\.it")
496496
any(map_lgl(shortlink_hosts, grepl, x = url))
497497
}
498498

man/zip-utils.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)