Tests
Test: custom-separator
Template
{% set separator = joiner(' |') %}
{% for item in items %}{{ separator() }} {{ item }}{% endfor %}
Data
{
"items": ["alpha", "beta", "charlie"]
}
Output Django (error) v1.10.1
Invalid block tag on line 1: 'set'. Did you forget to register or load this tag?
Output Jinja2 v2.8.0
alpha | beta | charlie
Output Liquid (error) v3.0.6
Liquid syntax error: Unknown tag 'set'
Output Nunjucks v2.5.0
alpha | beta | charlie
Output Swig (error) v1.4.2
(intermediate value)(intermediate value)(intermediate value) is not a function
Output Twig (error) v1.24.2
Unknown "joiner" function.
Output Twigjs (error) v0.9.5
TwigException: joiner function does not exist and is not defined in the context
Test: default
Template
{% set separator = joiner() %}
{% for item in items %}{{ separator() }} {{ item }}{% endfor %}
Data
{
"items": ["alpha", "beta", "charlie"]
}
Output Django (error) v1.10.1
Invalid block tag on line 1: 'set'. Did you forget to register or load this tag?
Output Jinja2 v2.8.0
alpha, beta, charlie
Output Liquid (error) v3.0.6
Liquid syntax error: Unknown tag 'set'
Output Nunjucks v2.5.0
alpha, beta, charlie
Output Swig (error) v1.4.2
(intermediate value)(intermediate value)(intermediate value) is not a function
Output Twig (error) v1.24.2
Unknown "joiner" function.
Output Twigjs (error) v0.9.5
TwigException: joiner function does not exist and is not defined in the context