yogthos/Selmer

Add whitespace control?

Open

#115 geöffnet am 1. Feb. 2016

Auf GitHub ansehen
 (21 Kommentare) (13 Reaktionen) (0 zugewiesene Personen)Clojure (86 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (670 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 39m) (4 gemergte PRs in 30 T)

Beschreibung

Jinja has a useful feature where you can strip out whitespace that you've added to make your template more readable:

{% for item in seq -%}
    {{ item }}
{%- endfor %}

This will yield all elements without whitespace between them. If seq was a list of numbers from 1 to 9, the output would be 123456789.

http://jinja.pocoo.org/docs/dev/templates/#whitespace-control

In other words, adding a - to get -%} will indicate that all whitespace should be removed between the for/if/other statement and the next character.

Feature request: any interest in adding this to Selmer?

Contributor Guide