rstudio / learnr

Interactive Tutorials with R Markdown
https://pkgs.rstudio.com/learnr
Apache License 2.0
713 stars 240 forks source link

Highlighting not picked up? #150

Closed TryingToGetThere closed 6 years ago

TryingToGetThere commented 6 years ago

Hi,

I'm trying to get the SQL highlighting to work as follows:

output: 
  learnr::tutorial:
    theme: united
    highlight: pygments
runtime: shiny_prerendered

But the output gives: --no-highlight

Should I do it differently?

TryingToGetThere commented 6 years ago
---
output: 
  learnr::tutorial:
    theme: united
    highlight: pygments
runtime: shiny_prerendered
---
garrettgman commented 6 years ago

I'm running into the same problem: learnr doesn't apply syntax highlighting. If it did, I could use code commenting to emphasize some lines, while "fading out" others. This would be very useful!

TryingToGetThere commented 6 years ago

Hi - it took a while, but finally found a work around that works for me. The source hook is described here: https://curtisalexander.github.io/rmarkdown-syntax-highlighting/ Hope that helps anyone struggling with the same at the moment.

schloerke commented 6 years ago

Standard syntax highlighting is now back. (master branch)

Alternative color schemes for code and exercise area are now enabled. Code highlighting is enabled with the highlight. Exercise area (ace editor) theming is done iwth ace_theme.

output:
  learnr::tutorial:
    highlight: pygments
    ace_theme: monokai
runtime: shiny_prerendered
mpfp commented 5 years ago

It's not working for me using the header info provided by @schloerke. Do I have have the highlight program installed (as referenced in the link provided by @TryingToGetThere?

lrdegeest commented 4 years ago

Also not working for me. Working with the latest version of learnr