JulienCabanes / requirejs-tpl

RequireJS Template Plugin
207 stars 43 forks source link

optimization inserts whitespaces at beginning and end of function #9

Open Bjornej opened 11 years ago

Bjornej commented 11 years ago

When using requirejs-tpl with r.js the created functions insert into the produced templates whitespaces at the beginning and at the end of the result.

This can result in some nasty problems depending on your css.

To solve this problem it's sufficient to modify line 53 from

+ "');}return __p.join('');";

to

+ "');}return __p.join('').trim();";

Is this a bug or the intended behaviour ?

PS: Thanks for the great plugin. It is really useful