xaringan
xaringan copied to clipboard
Code highlighting does not work when prompt=TRUE
I noticed that code highlighting does not work when the chunk option prompt = TRUE
is set. Here is an MWE:
---
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightLines: true
---
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
knitr::opts_chunk$set(eval = FALSE)
```
```{r with prompt, prompt=TRUE}
{{highlight == FALSE}}
```
```{r without prompt, prompt=FALSE}
{{highlight == TRUE}}
```
This seems to stem from the prompt character >
not being taken into account before evaluating the highlighting.