Skip to content

Commit 5beb7fd

Browse files
committed
rename highlight_cleaned to clean_highlight_tags in #706
and close #705
1 parent 2447c4e commit 5beb7fd

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
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.9.2
4+
Version: 0.9.3
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
77
person("JJ", "Allaire", role = "ctb"),

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGES IN bookdown VERSION 0.10
22

3+
## NEW FEATURES
4+
5+
- Added an argument `clean_highlight_tags` to `html_document2()` (thanks, @atusy, #706).
6+
37
## BUG FIXES
48

59
- Split reference sections in `gitbook` ignored the sorting definition of the citation style (thanks @GegznaV #661, @crsh #674).
@@ -12,7 +16,7 @@
1216

1317
# CHANGES IN bookdown VERSION 0.8
1418

15-
## NEW FEATURE
19+
## NEW FEATURES
1620

1721
- Added Conjecture to the list of theorem environments.
1822

R/html.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ tufte_html_book = function(...) {
110110
#' (the i-th figure/table); if \code{FALSE}, figures/tables will be numbered
111111
#' sequentially in the document from 1, 2, ..., and you cannot cross-reference
112112
#' section headers in this case.
113-
#' @param highlight_cleaned Whether to remove the <div> tags around <pre>,
114-
#' and clean up <a> on all lines in code blocks (default: `TRUE`).
113+
#' @param clean_highlight_tags Whether to remove the \verb{<div>} tags around
114+
#' \verb{<pre>}, and clean up \verb{<a>} on all lines in code blocks.
115115
#' @inheritParams pdf_book
116116
#' @return An R Markdown output format object to be passed to
117117
#' \code{rmarkdown::\link{render}()}.
@@ -124,7 +124,7 @@ tufte_html_book = function(...) {
124124
#' @export
125125
html_document2 = function(
126126
..., number_sections = TRUE, pandoc_args = NULL, base_format = rmarkdown::html_document,
127-
highlight_cleaned = TRUE
127+
clean_highlight_tags = TRUE
128128
) {
129129
base_format = get_base_format(base_format)
130130
config = base_format(
@@ -137,7 +137,7 @@ html_document2 = function(
137137
x = restore_appendix_html(x, remove = FALSE)
138138
x = restore_part_html(x, remove = FALSE)
139139
x = resolve_refs_html(x, global = !number_sections)
140-
if (highlight_cleaned) x = clean_pandoc2_highlight_tags(x)
140+
if (clean_highlight_tags) x = clean_pandoc2_highlight_tags(x)
141141
write_utf8(x, output)
142142
output
143143
}

man/html_document2.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)