Open deekayen opened 2 years ago
I think the indenting in the template might be there to make the template easier to read. It's a common practice to have the same indent level for the opening and closing tags of a jinja2 statement to be able to quickly realize where the statement begins/ends. But I agree that it's definitely not something that should translate into the file that's generated from the template.
I wonder if the lstrip_blocks
or trim_blocks
parameters of the template module might fix the issue instead of removing the indentation from the template (and making it harder on the eyes).
It's also probably possible to fix the whitespace issue by using the minus sign ( {%- %}
) in some of the affected jinja2 statements, see: https://jinja.palletsprojects.com/en/3.0.x/templates/#whitespace-control
This branch has conflicts that must be resolved
The spaces before each template block are adding together to make the final product output file indenting excessive. Opting here for final readability instead of templating readability.