Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deals with empty header-includes that now errors. #1728

Closed
cderv opened this issue Dec 9, 2019 · 2 comments
Closed

Deals with empty header-includes that now errors. #1728

cderv opened this issue Dec 9, 2019 · 2 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@cderv
Copy link
Collaborator

cderv commented Dec 9, 2019

This follows a question on community
https://community.rstudio.com/t/enc2utf8-issue-with-render-book-from-bookdown/46701/2

here is a reprex with las rmarkdown dev version

---
title: "test"
output: pdf_document
header-includes:
  -
---

```{r pressure, echo=FALSE, fig.align = 'center'}
plot(pressure)
stars(cbind(1:16, 10 * (16:1)), draw.segments = TRUE)
```

This will error to

Error in enc2utf8(text) : argument is not a character vector
Calls: <Anonymous> ... includes_to_pandoc_args -> includes -> as_tmpfile -> write_utf8 -> writeLines
Exécution arrêtée

because header-includes is empty but still pass to be written to the file, following the new way to include hearder with pandoc.

Let's note that with rmarkdown 1.17 there is no error and the file build ok to pdf. So this is a regression that I think should be deal with.

I'll work on a PR as soon as I can.

@yihui yihui closed this as completed in 8f00dc9 Dec 11, 2019
@yihui yihui added the bug an unexpected problem or unintended behavior label Dec 11, 2019
@yihui
Copy link
Member

yihui commented Dec 11, 2019

Should be fixed now. Thanks for the report!

@github-actions
Copy link

github-actions bot commented Nov 3, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants