wycats/handlebars.js — Issue #162: Whitespace
Author: derdesign
Created: 2012-01-11 00:42:57+00:00
State: open

There appears to be some additional newlines added to template partials, and I think Handlebars would benefit from removing them. Consider the following template code:

```html

{{#people}}
{{> person}}
{{/people}}

```

And the following template partial:

```html
{{name}} is cool!
\n
```

it is rendered the following way in Handlebars. Notice the extra line feeds, in the partial there's only one line feed at the end:

Troy Phelan is cool!

Rachel Lane is cool!

Josh Stafford is cool!

The following code is compiled from a mustache compiler provided by Twitter, using the exact same template & partial:

Troy Phelan is cool!

Rachel Lane is cool!

Josh Stafford is cool!

I believe, the latter is the proper way of rendering the mustache code in the template & partial. Here's [the script](http://paste.pocoo.org/show/533149/), in case you guys are interested.

I tried forking and submitting a pull request, but I was not able to figure out where the extra line feed is being added.