askama icon indicating copy to clipboard operation
askama copied to clipboard

Whitespace config not working?

Open jepcd opened this issue 4 years ago • 3 comments

Hi, I can't seem to get the whitespace option to work.

This is the file I'm trying to format

docker run -d \
    {% for volume in volumes %}
    -v {{ volume }} \
    {% endfor %}
    -e VERSION=docker \
    --restart unless-stopped \
    redis

askama.toml

[general]
dirs = ["scripts"]
whitespace = "suppress"

I've tried suppress and minimize, but both give this

docker run -d \
    
    -v /v1:/v1 \
    
    -v /v2:/v2 \
    
    -e VERSION=docker \
    --restart unless-stopped \
    redis

jepcd avatar Nov 27 '22 07:11 jepcd

It works if I use

    {%- for volume in volumes %}
    -v {{ volume }} \
    {%- endfor %}

but not the config

jepcd avatar Nov 27 '22 07:11 jepcd

What version are you using? I think this feature isn't yet available in released versions.

djc avatar Nov 28 '22 09:11 djc

Ah I should've checked beforehand, It works when I use git main Thanks!

jepcd avatar Nov 29 '22 00:11 jepcd