jehugaleahsa / mustache-sharp

An extension of the mustache text template engine for .NET.
The Unlicense
306 stars 78 forks source link

Removes NewLines on tag lines #42

Closed aloisdeniel closed 4 years ago

aloisdeniel commented 9 years ago

For me a simple approach would be to remove new lines for lines thats contain only tags when not using {{#NewLine}} tag

For example, here is a template :

{{#each Items}}
{{#if IsOk}}
That's okay !
{{#else}}
Nope ...
{{/if}}
{{/each}}

Currently, the ouput would be for example


That's okay !

That's okay !

Nope...

It could be great if we could have the lines with only tag ignored

That's okay !
That's okay !
Nope...
natemcmaster commented 9 years ago

:+1: