tools icon indicating copy to clipboard operation
tools copied to clipboard

JINJA logic evaluation trims off spacing

Open drpatelh opened this issue 3 years ago • 3 comments

Due to the code here when the pipeline is actually created we lose the leading whitespace in front of Website as you can see here.

drpatelh avatar Sep 12 '22 14:09 drpatelh

Easy fix: {% if branded -%} should become {% if branded %} (NB no - at the end).

May get a linting failure from Prettier after that. If so, need to move it onto the same line as the website

eg:

{% if branded %}    Website: https://nf-co.re/{{ short_name }}
    Slack  : https://nfcore.slack.com/channels/{{ short_name }}

ewels avatar Sep 12 '22 18:09 ewels

Same issue in the README: (there's a space missing towards the end of the line here: https://github.com/nf-core/isoseq/blob/dev/README.md?plain=1#L29)

maxulysse avatar Sep 27 '22 09:09 maxulysse

@maxulysse I don't understand what you mean here.

This line in the template is vanilla markdown without any Jinja tags: https://github.com/nf-core/tools/blob/bc56cdd35077e408a0a7c90ec07fcdff7c2d1f3b/nf_core/pipeline-template/README.md?plain=1#L32

ewels avatar Oct 01 '22 14:10 ewels

I will close it as it is fixed by #1830, but feel free to reopen if there are still issues.

mirpedrol avatar Mar 09 '23 13:03 mirpedrol