mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Reduce whitespace in jinja2 templates
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).
This commit is contained in:
parent
dddb067351
commit
4f8e3774bb
2 changed files with 3 additions and 1 deletions
|
|
@ -44,6 +44,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 %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% for i in range(4096) %}
|
||||
name@i@ 259200 A 1.2.3.4
|
||||
name@i@ 259200 TXT "Hello World @i@"
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue