cleanup whitespace after tags (jinja style)

This removes extra whitespace around tags, just like Jinja2 does

template:
```
items:
{% for item in items %}
  - {{ item }}
{% endfor %}
```

before:
```
items:

  - 1

  - 2

  - 3
```

after:
```
items:
  - 1
  - 2
  - 3
```