-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
Add more highlighting support for HTML output #1941
Conversation
document and add test
default syntax highlighting when downlit is used is now a11y.theme like in distill and |
Just a note that this is also working with |
…igthing is asked but not installed.
* Clearly identify "default" behavior * Use the existing wrapper pandoc_highlight_args
All this highlighting stuff started by downlit support in rmarkdown made me think. I found it was not clear enough in the current code, so I rewrote the whole function on the base of highlighting engine + syntax highlight theme. (Could still be clarified I think)
I did this only for the html format, but this could be apply also to other format (not downlit, but the use of I still need to update the documentation and look at the other reviews. |
One thing I missed to handle here is that there are some cases where we want to use downlit to produce highlighting for Chroma CSS. This is the case for
Either we should support both in here (using an option or another switch), or this is specific to blogdown and should be handle there directly. |
@yihui as we are focusing on rmarkdown currently, I have updated the PR and checked everything is ok. To sum-up, this PR reworks and document the highlighting logic. It has several aims:
This should work fine for Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I didn't review this PR carefully or read the conversations above. Please feel free to merge if/whenever you feel it's ready. Thanks!
[skip ci]
default needs to be change to a pandoc theme instead when `highlight_downlit` is TRUE
This PR aim to close #1881 by adding an option support for downlit highlighting using a new argument in the format, named
highlight_downlit
after the one chose in distillTo do
Support in
html_document
html_document
could benefit from this by activating the feature.Support in markdown output
downlit::downlit_md_path()
could be used, but only support Chroma for nowSupport ingithub_document
Support inmd_document
Edit: Won't add it here. See #1881 (comment)
About highlighting
html_document
highlight = "default"
) will be a pandoc style and not highlightjs.a11y.theme
file after its update (see Add more highlighting support for HTML output #1941 (comment))