Skip to content

Commit

Permalink
The \name{} field in an Rd file shouldn't be used in the topic index (
Browse files Browse the repository at this point in the history
#1586)

Fixes #1576
  • Loading branch information
dmurdoch committed Mar 26, 2021
1 parent 9a5a8f5 commit 672b8fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# pkgdown (development version)

* Automatic links to reference pages were generated incorrectly if the
`\name{}` entry in the `*.Rd` file didn't match the filename
(@dmurdoch, #1586).

* New "Customize your pkgdown website" vignette (#1573).

* Added extension points to make HTML widgets (and RGL in particular) work
Expand Down
3 changes: 2 additions & 1 deletion R/context.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ section_init <- function(pkg, depth, override = list(), .frame = parent.frame())

local_options_link <- function(pkg, depth, .frame = parent.frame()) {
article_index <- set_names(path_file(pkg$vignettes$file_out), pkg$vignettes$name)
topic_index <- invert_index(set_names(pkg$topics$alias, pkg$topics$name))
Rdname <- fs::path_ext_remove(pkg$topic$file_in)
topic_index <- invert_index(set_names(pkg$topics$alias, Rdname))

withr::local_options(
list(
Expand Down

0 comments on commit 672b8fc

Please sign in to comment.