When I include an image in a xaringan deck using knitr::include_graphics()
, my page break operator (---
) fails, and the next slide merges into the previous slide.
Here is a reprex demonstrating the problem:
---
title: "knitr::include_graphics() disables slide break operator (---)"
date: "2022-01-04"
output: xaringan::moon_reader
---
# This slide break will work
---
# But when my slide has an image, the slide break will fail
```{r out.width='30%'}
knitr::include_graphics("hp.jpg")
```
---
# This should have been a new slide
```{r out.width='30%'}
knitr::include_graphics("hp.jpg")
```