blastula icon indicating copy to clipboard operation
blastula copied to clipboard

Is code highlighting possible?

Open pschloss opened this issue 4 years ago • 1 comments

Is it possible to get code highlighting applied by default to output from blastula? If I do something like this...

---
title: test
output: blastula::blastula_email
highlight: pygments
---

```{r}
library(tidyverse)

filter(starwars, species == "Human")
```.

Then the outputted code block has a white background and there's no code highlighting. If I take the highlight line out of the YAML, I get the same output. I can change the background color with simple css, but is there an easier way and is it possible to get the code highlighting like a typical Rmd output document?

pschloss avatar Dec 30 '20 18:12 pschloss

If I do this instead...

---
title: test
output:
  blastula::blastula_email:
    highlight: pygments
---

It complains...

Error in rmarkdown::html_document(toc = toc, toc_depth = toc_depth, toc_float = toc_float,  : 
  formal argument "highlight" matched by multiple actual arguments

pschloss avatar Dec 30 '20 23:12 pschloss