Replies: 3 comments 2 replies
-
Tell your editor to stop adding trailing new lines to Jinja files 🙂 |
Beta Was this translation helpful? Give feedback.
-
I have worked around the issue for now by switching from including a template to importing a macro. This let me keep the newline configuration as-is. Fwiw, I used to use when:false on prompt variables with a jinja template as the default. This was much nicer, as I could simply use variable syntax throughout. Disappointed this behavior was changed. |
Beta Was this translation helpful? Give feedback.
-
Add a - at the end, to remove trailing whitespace: -{% include 'foo.jinja' %}
+{% include 'foo.jinja' -%} |
Beta Was this translation helpful? Give feedback.
-
Hello. I like
keep_trailing_newline: true
(the default in_envops
) but my editor always adds a trailing newline to all my files and it breaks places where I'm using{% include 'foo.jinja' %}
because the newline is rendered. I have searched for a way to suppress this newline only for includes but have not found it. Any ideas?Beta Was this translation helpful? Give feedback.
All reactions