Description Usage Details Examples
A style function must return a named list of functions. Possible entries:
reserved
: reserved words
number
: numeric literals
null
: the NULL
constant
operator
: operators, including assignment
call
: function calls
string
: character literals
comment
: comments
bracket
: brackets: (){}[]
1 |
Each entry in a list must be a function that takes a character
scalar, and returns a character scalar with the exception of bracket
which should be a list of functions defining a color sequence. The default style adds
ANSI formatting to the code.
Note that you can also change the code if you like, e.g. to include a unicode arrow character instead of the two-character assignment operator.
1 | highlight(deparse(get), style = default_style())
|
Attaching package: 'prettycode'
The following object is masked from 'package:base':
print.function
[1] "function (x, pos = -1L, envir = as.environment(pos), mode = \"any\", "
[2] " inherits = TRUE) "
[3] ".Internal(get(x, envir, mode, inherits))"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.