Supports highlightjs using RevealHighlight or usual R Markdown way ?
cderv opened this issue · 2 comments
R Markdown has current usually support for highlight.js through highlight:
paramater: https://pkgs.rstudio.com/rmarkdown/reference/html_document.html
revealjs currently only support Pandoc's syntax highlighting through the rmarkdown::pandoc_highlight_args()
function.
However, the template already have the loading of the library but it is not really included and I don't think that works
Also, reveal.js seems to have support through a Plugin : https://revealjs.com/code/
This brings features like
- Line number : https://revealjs.com/code/#line-numbers-%26-highlights (which Pandoc also has)
- Step by Step highlight: https://revealjs.com/code/#step-by-step-highlights
- HTML Character escaping: https://revealjs.com/code/#html-entities-4.1.0
I think the above is really old code that was once used in rmarkdown but removed in rmarkdown 1.2
rstudio/rmarkdown@d4aaf99
following the switch to use highlightjs with htmldependency
We should use the revealjs way IMO
Currently, highlightjs is never used because of
revealjs/R/revealjs_presentation.R
Lines 228 to 229 in cc46ea0
which will only set Pandoc's highlighting.
In rmarkdown, highlightjs can be triggered using rmarkdown:::pandoc_html_highlight_args()
and the default template.
So I believe no risk to remove this from the template.