baryshev / ect

Fastest JavaScript template engine with embedded CoffeeScript syntax

Home Page:http://ectjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Slurp" functionality?

johanjordaan opened this issue · comments

Hi. I might have missed a document somewhere, but how do I 'slurp' newlines? I have a template like:

<% for x in xes: %>
<%= x.name %>
<% end %>

Given a list of of xes the template will include extra new lines. I would like the output to be such that there is no newlines.

In EJS I added functionality such that:
<% for x in xes: -%>
<%= x.name %>
<% end -%>

would 'slurp' the newlines. This just makes for neater output.

Does functionality exist to do what I want? If not what is the chances of it being added? I can do it if it makes sense...

Regards
Johan

I'm finding that I need this too.