-
Notifications
You must be signed in to change notification settings - Fork 36
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
[FR] Syntax highlighting via downlit #152
Comments
@cderv would probably have great insights into this possible feature... |
Thanks for the ping, I would have probably miss this otherwise. I did not looked closely but it can be currently not straight forward. Some thoughts:
So anyhow, this could be tried in a POC to see what would be the best solution for this, its complexity and if it is worth the benefit (having downlit highlighting instead of highlight.js one). Regarding where, it could be in directly in xaringan for convenience I get. Otherwise, in xaringanExtra, it seems possible to add a hook and some CSS probably to be used in a presentation. |
Thanks for the detailed response, @cderv. It seems like making |
Great !
Maybe you could open this question as feature request in downlit to see if this is something that would be welcomed before you plan to work on this ? |
If xaringan changed their flow to use pandoc, then I think this would be feasible. But otherwise, it's pretty much a non-starter. downlit operates on pandoc's AST or on rendered HTML, neither of which are available to xaringan during the rendering step or even after the rendering step. |
Hi @gadenbuie,
How difficult do you think it would be to use
{downlit}
for syntax highlighting in axaringan
presentation?I think a
knitr
output hook for the source code, bundling a stylesheet, and disablinghighlight.js
would get most of the way there. What do you think? It would be nice to have the autolinking.I would be happy to work on a PR, but I wanted to float it past your first to see what you think.
The text was updated successfully, but these errors were encountered: