| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/config.R |
| 3 |
\name{jinjar_config} |
| 4 |
\alias{jinjar_config} |
| 5 |
\alias{default_config} |
| 6 |
\title{Configure the templating engine} |
| 7 |
\usage{ |
| 8 |
jinjar_config( |
| 9 |
loader = NULL, |
| 10 |
block_open = "{\%", |
| 11 |
block_close = "\%}", |
| 12 |
variable_open = "{{", |
| 13 |
variable_close = "}}", |
| 14 |
comment_open = "{#", |
| 15 |
comment_close = "#}", |
| 16 |
line_statement = NULL, |
| 17 |
trim_blocks = FALSE, |
| 18 |
lstrip_blocks = FALSE, |
| 19 |
ignore_missing_files = FALSE |
| 20 |
) |
| 21 |
|
| 22 |
default_config() |
| 23 |
} |
| 24 |
\arguments{ |
| 25 |
\item{loader}{How the engine discovers templates. Choices: |
| 26 |
\itemize{ |
| 27 |
\item \code{NULL} (default), disables search for templates. |
| 28 |
\item Path to template directory. |
| 29 |
\item A \code{\link{loader}} object. |
| 30 |
}} |
| 31 |
|
| 32 |
\item{block_open, block_close}{The opening and closing delimiters |
| 33 |
for control blocks. Default: \verb{"\{\%"} and \verb{"\%\}"}.} |
| 34 |
|
| 35 |
\item{variable_open, variable_close}{The opening and closing delimiters |
| 36 |
for print statements. Default: \code{"{{"} and \code{"}}"}.} |
| 37 |
|
| 38 |
\item{comment_open, comment_close}{The opening and closing delimiters |
| 39 |
for comments. Default: \code{"{#"} and \code{"#}"}.} |
| 40 |
|
| 41 |
\item{line_statement}{The prefix for an inline statement. If \code{NULL} (the |
| 42 |
default), inline statements are disabled.} |
| 43 |
|
| 44 |
\item{trim_blocks}{Remove first newline after a block. Default: \code{FALSE}.} |
| 45 |
|
| 46 |
\item{lstrip_blocks}{Remove inline whitespace before a block. Default: \code{FALSE}.} |
| 47 |
|
| 48 |
\item{ignore_missing_files}{Ignore \code{include} or \code{extends} statements when |
| 49 |
the auxiliary template cannot be found. If \code{FALSE} (default), then an error |
| 50 |
is raised.} |
| 51 |
} |
| 52 |
\value{ |
| 53 |
A \code{"jinjar_config"} object. |
| 54 |
} |
| 55 |
\description{ |
| 56 |
Create an object to configure the templating engine behavior (e.g. customize |
| 57 |
the syntax). The default values have been chosen to match the Jinja defaults. |
| 58 |
} |
| 59 |
\note{ |
| 60 |
The equivalent Jinja class is \code{Environment}, but this term has special |
| 61 |
significance in R (see \code{\link[=environment]{environment()}}). |
| 62 |
} |
| 63 |
\examples{ |
| 64 |
jinjar_config() |
| 65 |
} |