Skip to content

Commit

Permalink
fix setup links with fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
ErinBecker committed Sep 22, 2023
1 parent 0572bcd commit 70a51e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/utils-xml.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ fix_setup_link <- function(nodes = NULL) {
setup_links <- hrefs$scheme == "" &
hrefs$server == "" &
hrefs$path == "setup.html"
xml2::xml_set_attr(links[setup_links], "href", "index.html#setup")
fragment <- ifelse(hrefs$fragment == "", "setup", hrefs$fragment)
replacement <- paste0("index.html#", fragment)
xml2::xml_set_attr(links[setup_links], "href", replacement)
invisible(nodes)
}

Expand Down

0 comments on commit 70a51e9

Please sign in to comment.