jinjar_config {jinjar} | R Documentation |
Configure the templating engine
Description
Create an object to configure the templating engine behavior (e.g. customize the syntax). The default values have been chosen to match the Jinja defaults.
Usage
jinjar_config(
loader = NULL,
block_open = "{%",
block_close = "%}",
variable_open = "{{",
variable_close = "}}",
comment_open = "{#",
comment_close = "#}",
line_statement = NULL,
trim_blocks = FALSE,
lstrip_blocks = FALSE,
ignore_missing_files = FALSE
)
default_config()
Arguments
loader |
How the engine discovers templates. Choices:
|
block_open , block_close |
The opening and closing delimiters
for control blocks. Default: |
variable_open , variable_close |
The opening and closing delimiters
for print statements. Default: |
comment_open , comment_close |
The opening and closing delimiters
for comments. Default: |
line_statement |
The prefix for an inline statement. If |
trim_blocks |
Remove first newline after a block. Default: |
lstrip_blocks |
Remove inline whitespace before a block. Default: |
ignore_missing_files |
Ignore |
Value
A "jinjar_config"
object.
Note
The equivalent Jinja class is Environment
, but this term has special
significance in R (see environment()
).
Examples
jinjar_config()