You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating Rstudio (Version 1.4.1103) & re-knitting my RMD file the default syntax highlighting changed. I did not specify any statements in the YAML (i.e., default/automatic highlighting). I would like to reproduce the original style (highlighting color was orange rather than yellow). I tried all the yaml options found in Garrick's blog but could not reproduce this style. To see the change in highlighting style see the before and after screenshots here.
Here is the github repository which contains the rmarkdown file after the highlighting changes.
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rmarkdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rmarkdown').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered:
Hi @garberadamc Thanks for opening the issue. It is very clear and the link to your repo helped a lot.
I believe the change you see is due to a change in Pandoc version. RStudio 1.3 came by default with Pandoc 2.7.3 and RStudio 1.4 comes with Pandoc 2.11.2.
As you are using PDF, the default highlighting style is tango from Pandoc Syntax Highlighting. This means that is Pandoc doing the code parsing for syntax highlighting, and set the style to tango in this case. It seems they have changed the parsing and maybe also the style.
This is also a way to pin a specific Pandoc version within a document. You won't have access to bug fix and new Pandoc features, but this is the same as when you are pinning some R packages.
There would be another solution which is to export old style from Pandoc 2.7.3 and apply on the new Pandoc, but currently this is not easy with rmarkdown or other tool - we'll work on that. (Related to #2035)
Is it helping understanding the why ?
Thank you for your patience while we try to find the proper solution to avoid such thing in the future.
@garberadamc I also found out about this bug today. It happens to me when the pandoc version is 2.11.2 and 2.11.4 (latest).
I remember it was fine sometime last year, so I tried the 2.10.1 (updated ~7 months ago) and the syntax highlight is now back to as before. I use conda, so it is quite easy to switch between different pandoc versions, you can give it a go.
edit: I set this gallery up to show the differences in the syntax highlightings before and after v2.11 for all supported styles.
After updating Rstudio (Version 1.4.1103) & re-knitting my RMD file the default syntax highlighting changed. I did not specify any statements in the YAML (i.e., default/automatic highlighting). I would like to reproduce the original style (highlighting color was orange rather than yellow). I tried all the yaml options found in Garrick's blog but could not reproduce this style. To see the change in highlighting style see the before and after screenshots here.
By filing an issue to this repo, I promise that
xfun::session_info('rmarkdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rmarkdown')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: