-
Notifications
You must be signed in to change notification settings - Fork 21
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
Could flair add instead of replace highlighting? #5
Comments
It's definitely something we would like, too. The challenge is that syntax highlighting happens post-knit, via JavaScript, so this would have to be done "manually"; we can't take advantage of the natural syntax highlighting process. So - it's on our to-do list, but it might be a little while, unfortunately. |
Hey--I think flair might be able to make these feature work with a small change! The crux is that highlight.js can do highlighting, even of code blocks that have span elements (like flair uses to mark pieces of code). It looks like in most cases, if flair puts the name of the engine back as a class on the code output, then highlightjs will work with it. |
Coming back to this as I was having fun blurring code. Example, not a nice interface yet 😅
|
what I particularly like with downlit is the autolinking. |
At the moment in e.g. https://kbodwin.github.io/flair/index.html#re-referencing-a-chunk the code chunk
has R syntax highlighting (different color for the argument for instance) whereas the following chunk has the yellow highlight but all the rest of the text is black.
Would it be possible and make sense for flair to add formatting to the existing syntax highlighting? I'm guessing it might be hard.
The text was updated successfully, but these errors were encountered: