Skip to content

Commit

Permalink
Only do the chcp setting with Pandoc before 2.0
Browse files Browse the repository at this point in the history
This usage of chcp was introduced in 955ebae to fix #134

It was pre pandoc 2.0 and accompanied with an issue upstream jgm/pandoc#2101

I believe pandoc now handles directly this better and this is not needed anymore. Let's see
  • Loading branch information
cderv committed Apr 28, 2023
1 parent fce12fb commit 689130c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/ioslides_presentation.R
Expand Up @@ -428,7 +428,7 @@ ioslides_presentation <- function(number_sections = FALSE,
# duration of the Pandoc command. Without this, Pandoc fails when attempting
# to hand UTF-8 encoded non-ASCII characters over to the custom Lua writer.
# See https://github.com/rstudio/rmarkdown/issues/134
if (is_windows()) {
if (is_windows() && !pandoc2.0()) {
# 'chcp' returns e.g., "Active code page: 437"; strip characters and parse
# the number
codepage <- as.numeric(gsub("\\D", "", system2("chcp", stdout = TRUE)))
Expand Down

0 comments on commit 689130c

Please sign in to comment.