external_highlight {highlight} | R Documentation |
Multi-language source code highlighter
Description
Multi-language source code highlighter
Usage
external_highlight(
file,
outfile = stdout(),
theme = "kwrite",
lang = NULL,
type = "HTML",
line_numbers = FALSE,
doc = TRUE,
code
)
Arguments
file |
Source file to highlight |
outfile |
Destination of the highlighted code.
When |
theme |
One of the themes. See |
lang |
The language in which the code is to be interpreted. If this argument is not given, it will be deduced from the file extension. |
type |
Output format. See |
line_numbers |
if |
doc |
if |
code |
If given, then the source code is not read from the file |
Value
Nothing if outfile
is given, with the side effect of writing into the file.
The result as a character vector if outfile is NULL
See Also
highlight
to highlight R code using the information from the parser