Adopt Chromium's Jinja style guide
Adopt Chromium's Jinja style guide
I get really confused by Jinja's whitespace treatment and when to
use {%- -%}
. Perhaps adopting some uniform Jinja style guidelines
could help. The closest thing to a Jinja "best practices" document
that I could find is this style guide from the Chromium project:
https://www.chromium.org/developers/jinja
Take a look. I think it makes the templates more readable.
Edited by Leo P. Singer