Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I am interested in an alternative that you find more elegant.

Why not make it a filter/pipeline (I haven't used template/text in ages, does it support this?), like in Django {{ thing|trimleft }}.



{{ foo -}} does not strip white space from the output of foo. It eats up the following white space.

So "{{ foo -}} bar" renders the same as "{{ foo }}bar".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: