mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)

Home Page:https://mozilla.github.io/nunjucks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Block assignment filters do not work

dhruvkb opened this issue · comments

Jinja supports block assignment since v2.8 and block assignment filters since v2.10. The latter is missing from Nunjucks and should be supported.

For example, the template below

{% set content | indent(2, true) %}
This is some text

and this is some text
{% endset %}
{{ content }}

when rendering, raises the error

Uncaught:
Template render error: (unknown path) [Line 1, Column 4]
  parseSet: expected = or block end in set tag