Skip to content

Commit 1ffd96c

Browse files
committed
fix #1442: make sure the fallback index file list is of length 1 before checking if it exists
1 parent 3898705 commit 1ffd96c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bookdown
22
Type: Package
33
Title: Authoring Books and Technical Documents with R Markdown
4-
Version: 0.35.1
4+
Version: 0.35.2
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
77
person("Christophe", "Dervieux", , "[email protected]", role = c("ctb"),

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

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

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

67
# CHANGES IN bookdown VERSION 0.35
78

R/utils.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ get_output_formats = function(fallback_format, filter = identity, first = FALSE,
413413
index = get_index_file()
414414
# Use fallback file unless no YAML
415415
if (is_empty(index)) {
416-
if (!is.null(fallback_index) &&
416+
if (length(fallback_index) == 1 &&
417417
xfun::file_exists(fallback_index) &&
418418
length(rmarkdown::yaml_front_matter(fallback_index)) != 0
419419
) {

0 commit comments

Comments
 (0)