]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Reduce whitespace in jinja2 templates
authorNicki Křížek <nicki@isc.org>
Tue, 7 Apr 2026 12:40:33 +0000 (14:40 +0200)
committerNicki Křížek <nicki@isc.org>
Thu, 28 May 2026 14:52:24 +0000 (16:52 +0200)
Omit extra newlines when combining and including templates.

Adjust the xfer/ns8/small.db.j2 so it doesn't trim the endline twice
(as that would join the two subsequent records on the same line).

(cherry picked from commit 4f8e3774bba0f63d98e651ef044d6703792921a2)

bin/tests/system/isctest/template.py

index 130d36306938ba692c33c929436d694124339bbc..845a372da4612795ba1f3771cdcd62001a5fa46f 100644 (file)
@@ -61,6 +61,8 @@ class TemplateEngine:
                 undefined=jinja2.StrictUndefined,
                 variable_start_string="@",
                 variable_end_string="@",
+                trim_blocks=True,
+                keep_trailing_newline=True,
             )
             # allow instantiating the template dataclasses in jinja2 templates when
             # using {% set %}