Skip to content

Commit

Permalink
chapt_title <- chapt_titles
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Jun 26, 2024
1 parent 39afd45 commit eb7aa75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/bookdown_to_leanpub.R
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ get_chapters <- function(html_page = file.path("docs", "index.html"),
nodes <- nodes[grep("chapter",as.character(nodes))]

# Extract chapter nodes from the sidebar
chapt_titles <- nodes %>%
chapt_title <- nodes %>%
rvest::html_nodes('span.chapter-title') %>%
rvest::html_text()

Expand All @@ -460,7 +460,7 @@ get_chapters <- function(html_page = file.path("docs", "index.html"),
rvest::html_attr('href') %>%
stringr::str_remove("^\\.\\/")

chapt_data <- data.frame(chapt_titles, data_level, url = paste0(base_url, "/", data_path))
chapt_data <- data.frame(chapt_title, data_level, url = paste0(base_url, "/", data_path))

} else {
chapt_data <- rvest::html_attrs(nodes) %>%
Expand Down

0 comments on commit eb7aa75

Please sign in to comment.