Closed dstansby closed 5 months ago
Is prettier complaining about the {% if cookiecutter.funder != '' %}
clause? Because we're using {% if...
elsewhere in template README.
Might be because without a funder the README was getting two newlines at the end? Lets see if my fix works...
So I've had a look and prettier
currently fails if there's a funder or not.
Without funder - removes trailing line
With funder - two different lines removed
Let me have a play
I've fixed the no funder case
This is fixed now @dstansby. Basically, it was just some jinja2
syntax missing. In general, I've found it best to have things in the following format (note the -
):
{%- if something %}
some code
{%- endif %}
What does the -
do?
What does the
-
do?
Just whitespace control https://www.redpill-linpro.com/techblog/2023/07/19/jinja_whitespaces.html
Fixes https://github.com/UCL-ARC/python-tooling/issues/290; depends on https://github.com/UCL-ARC/python-tooling/pull/405.