Skip to content

Commit 28b11a4

Browse files
authored
Add text in Line Block in search data for bs4_book (#1193)
1 parent 3c4eca3 commit 28b11a4

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
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.22.8
4+
Version: 0.22.9
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
77
person("JJ", "Allaire", role = "ctb"),

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANGES IN bookdown VERSION 0.23
22

3+
- Fix an issue with `bs4_book()` where text written using [Line Block](https://bookdown.org/yihui/rmarkdown-cookbook/indent-text.html) was not found in search (thanks, @dmklotz, #1141).
4+
35
- `bs4_book()` has now some `<meta>` tags that allows sharing a published book on social media. `cover-image`, `url`, `title` and `description` set in YAML will be used in `index.html` and then modified to be adapted per HTML page (#1034).
46

57
- Style change in `bs4_book()` where code block inside callout blocks will have their background fill the whole width of the bordered block (#1175).

R/bs4_book.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ bs4_index_data <- function(node, chapter, path) {
712712
}
713713

714714
all <- function(...) paste0("descendant-or-self::", c(...), collapse = "|")
715-
text_path <- all("p", "li", "caption", "figcaption", "dt", "dd")
715+
text_path <- all("p", "li", "caption", "figcaption", "dt", "dd", "div[contains(@class, 'line-block')]")
716716
code_path <- all("pre")
717717

718718
code <- xml2::xml_find_all(children, code_path)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy