How can I highlight a single word or a selection of code in xaringan instead of the whole line?
In the following example I want to highlight only the pipe operator %>%
and not the whole line.
---
output:
xaringan::moon_reader:
css: [default]
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
```{r setup, include=F}
library(magrittr)
```
Highlight Whole Line (not what I need)
```{r, eval=F}
iris %>% #<<
summary()
```
Highlight Whole Line 2 (also not what I need)
```{r, eval=F}
{{ iris %>% }}
summary()
```
Highlight Pipe only (What I would need, doesnt work)
```{r, eval=F}
iris {{ %>% }}
summary()
```
Highlight Pipe only html-mark (doesnt work, as expected)
```{r, eval=F}
iris <mark>%>%</mark>
summary()
```
Any help is appreciated.