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

Rendering newlines and spacing #172

Closed emoryy closed 5 years ago

emoryy commented 10 years ago

This emblem and handlebars code should render the same html, right?

label Text1
= link-to 'somewhere': span #{a-helper something.prop}
|  
i.fa.fa-chevron-right
label Text2
<label>Text1</label>
{{#link-to 'somewhere'}}<span>{{a-helper something.prop}}</span>{{/link-to}}
&nbsp;
<i class="fa fa-chevron-right"></i>
<label>Text2</label>

Well, they are not. Handlebars leaves a bunch of newlines (\n) in the code resulting a different spacing between these inline elements.