line_number {highlighter} | R Documentation |
Line Number plugin
Description
Line Number plugin
Usage
line_number(use_line_number = TRUE, start_from = 1)
Arguments
use_line_number |
Logical |
start_from |
A numeric indicating where to start to count from |
Value
A list (named) with the name of the plugin, the class passed to the render function and the line number in which the line numbers will start from (optional).
Examples
if (interactive()) {
highlighter::highlighter(
"print('Hello, world!')\ncat <- \"Aristofanes\"\nstr(some_variable)",
language = "r",
plugins = list(
line_number(
use_line_number = TRUE,
start_from = 2
)
)
)
}
[Package highlighter version 0.1 Index]