jinja icon indicating copy to clipboard operation
jinja copied to clipboard

Use correct concat function for blocks evaluation

Open mkrizek opened this issue 2 years ago • 1 comments

  • fixes #1701

Checklist:

  • [ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • [ ] Add or update relevant docs, in the docs folder and in code.
  • [ ] Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • [ ] Add .. versionchanged:: entries in any relevant code docs.
  • [ ] Run pre-commit hooks and fix any issues.
  • [ ] Run pytest and tox, no tests failed.

mkrizek avatar Aug 09 '22 08:08 mkrizek

@davidism sorry for mention. Could you look at PR?

This bug prevents me from using integers in blocks in some legacy templates.

Things like this just stopped working in ansible

NativeEnvironment().from_string("{% set foo = 123 %}{%- block bar -%}{{- foo -}}{%- endblock -%}{{- self.bar() -}}").render()

doc-sheet avatar Aug 10 '23 17:08 doc-sheet