Skip to content

Commit

Permalink
fix #1442: make sure the fallback index file list is of length 1 befo…
Browse files Browse the repository at this point in the history
…re checking if it exists
  • Loading branch information
yihui committed Oct 9, 2023
1 parent 3898705 commit 1ffd96c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bookdown
Type: Package
Title: Authoring Books and Technical Documents with R Markdown
Version: 0.35.1
Version: 0.35.2
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person("Christophe", "Dervieux", , "[email protected]", role = c("ctb"),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Fix an issue with parsing resources from raw HTML code (thanks, @lennylin, https://community.rstudio.com/t/bookdown-image-with-a-weblink/172542)

- R 4.3.x would error if multiple files are passed to `render_book()` without an `output_format` specified (thanks, @slodge-work, #1442).

# CHANGES IN bookdown VERSION 0.35

Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ get_output_formats = function(fallback_format, filter = identity, first = FALSE,
index = get_index_file()
# Use fallback file unless no YAML
if (is_empty(index)) {
if (!is.null(fallback_index) &&
if (length(fallback_index) == 1 &&
xfun::file_exists(fallback_index) &&
length(rmarkdown::yaml_front_matter(fallback_index)) != 0
) {
Expand Down

0 comments on commit 1ffd96c

Please sign in to comment.