-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
BugReports
to be an email (#2758)
Fixes #2275
- Loading branch information
1 parent
be2fd26
commit 1a6c8b7
Showing
4 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,3 +149,11 @@ | |
! In _pkgdown.yml, home.sidebar.components.fancy must have components "title" and "text". | ||
2 missing components: "title" and "text". | ||
|
||
# allow email in BugReports | ||
|
||
Code | ||
xpath_xml(html, ".//li/a") | ||
Output | ||
<a href="mailto:[email protected]">Report a bug</a> | ||
<a href="authors.html#citation">Citing testpackage</a> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ test_that("math is handled", { | |
expect_equal(xpath_length(html, ".//math"), 1) | ||
}) | ||
|
||
test_that("data_home() validates yaml metadata", { | ||
test_that("data_home() validates yaml metadata", { | ||
data_home_ <- function(...) { | ||
pkg <- local_pkgdown_site(meta = list(...)) | ||
data_home(pkg) | ||
|
@@ -153,3 +153,10 @@ test_that("cran_unquote works", { | |
"Quoting is CRAN's thing." | ||
) | ||
}) | ||
|
||
test_that("allow email in BugReports", { | ||
# currently desc throws a warning if BugReports is an email | ||
pkg <- local_pkgdown_site(desc = list(BugReports = "[email protected]")) | ||
html <- xml2::read_html(data_home_sidebar(pkg)) | ||
expect_snapshot(xpath_xml(html, ".//li/a")) | ||
}) |