sstephenson / eco

Embedded CoffeeScript templates
MIT License
1.71k stars 70 forks source link

White space issues when creating objects in views? #30

Open schlegelrock opened 13 years ago

schlegelrock commented 13 years ago

In an view.eco, I have the following snippet that I want to pass to my layout.eco.

<% @meta = { "title" : "Learning Resources", "key": "learn", "css": [ "/css/learn.css", "/css/dialog.css" ] } %>

I can't for the life of me figure out how to line break it so the parser won't barf. Desired output would be...

<% @meta = 
    title : "Learning Resources" 
    key: "learn"
    css: [ /css/learn.css, /css/dialog.css ] 
%>

The documentation suggests that I can add a colon (:) to escape a line break but I am either doing it wrong or it doesn't work.

Thoughts?