Skip to content

include_graphics() fails with knitr 1.49 and later if fig.cap contains a double quote. #2395

@bergsmat

Description

@bergsmat

Consider this Rmd content:

---
output: html_document
---

```{r fig.cap = ' " '}
knitr::include_graphics("logo.png")
sessionInfo()
```

It compiles nicely for me using knitr 1.48, but fails with 1.49 and 1.50 because the enclosing brackets are replaced with character entity references. In short, fig.cap can no longer contain a double quote character.

Image
Image
Image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions