-
Notifications
You must be signed in to change notification settings - Fork 38
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 .profvis-code
scope to CSS
#142
Conversation
This doesn't appear to work — now the code has no syntax highlighting. Probably because we also need to adjust the scope that highlight.js is applied to. |
Looks like we need to update |
Actually, we're already doing that: rows.append("td")
.attr("class", "code r")
.text(function(d) { return d.content; })
.each(function() { hljs.highlightBlock(this); }); So it might be sufficient to update highlight.js? |
This is definitely an improvement since we the styles are now better scoped, but it still appears to be re-styling other code blocks, and I can't figure out why. |
Updating highlight to latest version to fixes the problem, since it no longer automatically highlights pre blocks across the whole page. |
@wch do you mind double checking with this reprex?
|
Good idea. That all looks good to me. |
This makes it so that profvis will not affect other blocks of code, such as those from rmarkdown or Quarto.
Note: this still needs to be tested.
Fixes #140