Skip to content

Commit

Permalink
rename highlight_cleaned to clean_highlight_tags in #706
Browse files Browse the repository at this point in the history
and close #705
  • Loading branch information
yihui committed May 1, 2019
1 parent 2447c4e commit 5beb7fd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,7 +1,7 @@
Package: bookdown
Type: Package
Title: Authoring Books and Technical Documents with R Markdown
Version: 0.9.2
Version: 0.9.3
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("JJ", "Allaire", role = "ctb"),
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
@@ -1,5 +1,9 @@
# CHANGES IN bookdown VERSION 0.10

## NEW FEATURES

- Added an argument `clean_highlight_tags` to `html_document2()` (thanks, @atusy, #706).

## BUG FIXES

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

# CHANGES IN bookdown VERSION 0.8

## NEW FEATURE
## NEW FEATURES

- Added Conjecture to the list of theorem environments.

Expand Down
8 changes: 4 additions & 4 deletions R/html.R
Expand Up @@ -110,8 +110,8 @@ tufte_html_book = function(...) {
#' (the i-th figure/table); if \code{FALSE}, figures/tables will be numbered
#' sequentially in the document from 1, 2, ..., and you cannot cross-reference
#' section headers in this case.
#' @param highlight_cleaned Whether to remove the <div> tags around <pre>,
#' and clean up <a> on all lines in code blocks (default: `TRUE`).
#' @param clean_highlight_tags Whether to remove the \verb{<div>} tags around
#' \verb{<pre>}, and clean up \verb{<a>} on all lines in code blocks.
#' @inheritParams pdf_book
#' @return An R Markdown output format object to be passed to
#' \code{rmarkdown::\link{render}()}.
Expand All @@ -124,7 +124,7 @@ tufte_html_book = function(...) {
#' @export
html_document2 = function(
..., number_sections = TRUE, pandoc_args = NULL, base_format = rmarkdown::html_document,
highlight_cleaned = TRUE
clean_highlight_tags = TRUE
) {
base_format = get_base_format(base_format)
config = base_format(
Expand All @@ -137,7 +137,7 @@ html_document2 = function(
x = restore_appendix_html(x, remove = FALSE)
x = restore_part_html(x, remove = FALSE)
x = resolve_refs_html(x, global = !number_sections)
if (highlight_cleaned) x = clean_pandoc2_highlight_tags(x)
if (clean_highlight_tags) x = clean_pandoc2_highlight_tags(x)
write_utf8(x, output)
output
}
Expand Down
6 changes: 3 additions & 3 deletions man/html_document2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5beb7fd

Please sign in to comment.