Skip to content
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

syntax highlighting in print.vertical() #417

wlandau opened this issue Aug 18, 2018 · 1 comment

syntax highlighting in print.vertical() #417

wlandau opened this issue Aug 18, 2018 · 1 comment


Copy link

wlandau commented Aug 18, 2018

It would be nice to see syntax highlighting when I print out styled code in the console and in knitr / R Markdown reports:

  x * (sqrt(5) + 1) / 2 
#> function(x) {
#>   x * (sqrt(5) + 1) / 2
#> }

Motivating use case: ropensci/drake#489. Packages that may help:

Copy link

lorenzwalthert commented Aug 18, 2018

Thanks for raising the issue and putting all the references here, really appreciate that. In fact, this should be straightforward. See my branch highlight-print-vertical for a primer. Using prettycode::highlight() seems to be a good solution. Have not tested the others. The dependency would probably be added under Suggests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants