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