machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Generating Ember.TEMPLATES #113

Closed jgelens closed 10 years ago

jgelens commented 10 years ago

I'm generating a file filling Ember.TEMPLATES manually:

   Ember.TEMPLATES[templateName] = Emblem.compile('some vanilla string template')

This work perfectly for Handlebars, but when removing line breaks in Emblem it breaks of course. Is there a way to do same thing using Emblem templates?

machty commented 10 years ago

Replace the line breaks with '\n' in your string and it should work, e.g.

Emblem.compile("p Hello\np Next line")