-
-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a syntax definition file with updated support for R new syntax #2196
Comments
From a report in tidyverse/reprex#389, let's acknowledge that the current fix is not working for ---
title: "Minimal Example"
output:
github_document: default
html_document:
highlight: pygments
---
```{r}
library(magrittr)
1.23 %>% round()
1.23 |> round()
``` |
Waiting for this to be completely fixed, I published a gist with a patched xml file one could use: https://gist.github.com/cderv/079b78caefbe45da6d1c03d737970b55 It can be downloaded then used by adding
See comment here for more detail and example on how to set a font for having the ligature in PDF |
Could you submit a PR to KDE? I guess this is the file to edit: https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/data/syntax/r.xml The earlier we submit a PR, the better, since it will take time for the upstream change (if merged) to propagate to Pandoc. |
I wanted to try add support for new syntax to define function too (\(x) x + 1)(2)
#> [1] 3 But I still haven't done the KDE file update for this. You're right I should do it wit the current addition. |
PR opened in KDE repo: https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/295 |
PR has been merged - they dealt with the KDE specific compilation. This means that next Pandoc version should have the new file included as they pull from the KDE repo in https://github.com/jgm/skylighting to be included in Pandoc. |
It seems skylighting has picked up the changes: jgm/skylighting@8bb0095#diff-250158d7bb3fc1cdf086670cbd7ea7fe8ccb68f6004b3739b36960d574372e35 I guess we should also submit a PR to KDE with 5514393, right? |
Yes it has picked up the change and also Pandoc (jgm/pandoc@2a70d9c) but not yet in a release. Next one should have it. I have still a PR in skylighting for PR for KDE with last change is ready but not yet online. I have prepare that yesterday with the changes in the PR. |
It seems to be shipped in Pandoc 2.18. The RStudio IDE uses Pandoc 3.x now, so perhaps we can drop |
Yes it seems ok to do that. |
First issue has been reported in rstudio/bookdown#1157. See discussion there for details. In a nutshell:
Current fix in rmarkdown is for
html_document_base()
only as a post processing - see 99df4e7 . This fixes the issue rstudio/bookdown#1157Proper fix should be:
--syntax-definition
flag.The text was updated successfully, but these errors were encountered: