print.jinjar_template {jinjar} | R Documentation |
Print a template
Description
Once a template has been parsed, it can be printed with color highlighting of the templating blocks.
Usage
## S3 method for class 'jinjar_template'
print(x, ..., n = 10)
Arguments
x |
A parsed template (use |
... |
These dots are for future extensions and must be empty. |
n |
Number of lines to show. If |
Examples
input <- '<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ title }}</title>
</head>
<body>
<ul id="navigation">
{% for item in navigation -%}
<li><a href="{{ item.href }}">{{ item.caption }}</a></li>
{% endfor -%}
</ul>
{# a comment #}
</body>
</html>'
x <- parse_template(input)
print(x)
print(x, n = Inf)
[Package jinjar version 0.3.1 Index]