I am making xaringan slides. I have a string that is split up over multiple lines in a code chunk. Is it possible to have the entire string highlighted?
Below is a picture of what I mean. I would like the entire string, which represents a SQL query, formatted in red.
I believe this is an issue with Remark.js library that xaringan is using. The new line makes the code parsing with highlight.js not working as expected.
Not having a new line is making the string highlight correct
---
title: "A Minimal Book Example"
output: xaringan::moon_reader
---
# test
```{r, eval = FALSE}
df <- dbGetQuery(
con,
"SELECT film_id, title, description FROM film WHERE release_year = 2006"
)
head(df, 3)
```
Issue will be with any multiline string:
---
title: "A Minimal Book Example"
output: xaringan::moon_reader
---
# test
```{r, eval = FALSE}
query <- "Long string
multi line"
```