prettify_V8 | R Documentation |
Prettify some code using the V8 package.
prettify_V8(contents = NA, language = NA, tabSize = NULL)
contents |
the code to be prettified; there are three possibilities for
this argument:
|
language |
the language of the code, such as |
tabSize |
number of spaces of the indentation (usually |
The pretty code in a character string.
library(prettifyAddins)
code <- c(
"function f(x){",
"return x+1",
"}"
)
cat(prettify_V8(code, "JavaScript"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.