From d5857510a304f9640aa7280d0faca5514efd13a4 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 18 Mar 2022 10:31:25 -0500 Subject: [PATCH] add an option to indicate xaringan's output format (#307) --- DESCRIPTION | 2 +- NEWS.md | 2 ++ R/render.R | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index adc6e80..a6697c4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: xaringan Type: Package Title: Presentation Ninja -Version: 0.23.2 +Version: 0.23.3 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), # contributors ordered alphabetically below diff --git a/NEWS.md b/NEWS.md index 7c37c63..ad93040 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,8 @@ - In JAWS 16.0.2136 or later, users must keep turning on a setting called "Allow Web Application Reserved Keystrokes," which is enabled by default. - The shortcut keys available on the slide help page (press `h` on any slide to obtain them) are supported. +- Correctly print output from `sql` chunks as tables (thanks, @thohan88 @gadenbuie @cderv, #307). + # CHANGES IN xaringan VERSION 0.23 - Preserve text wrapping in the `xaringan::moon_reader` output to avoid issues like #345 (thanks, @ellessenne @cderv). diff --git a/R/render.R b/R/render.R index abde86b..3b7bbcb 100644 --- a/R/render.R +++ b/R/render.R @@ -211,8 +211,10 @@ moon_reader = function( rmarkdown::knitr_options(knit_hooks = highlight_hooks), NULL, clean_supporting = self_contained, pre_knit = function(input, ...) { - # don't use Pandoc raw blocks ```{=} (#293) - opts <<- options(htmltools.preserve.raw = FALSE) + opts <<- options( + htmltools.preserve.raw = FALSE, # don't use Pandoc raw blocks ```{=} (#293) + xaringan.format = 'moon_reader' # indicate xaringan's output format + ) } pre_processor = function( metadata, input_file, runtime, knit_meta, files_dir, output_dir