Skip to content

Commit

Permalink
Don't add newline after partial when loading it, fixes #125
Browse files Browse the repository at this point in the history
  • Loading branch information
gakimball committed Jul 13, 2017
1 parent 8edca3a commit da102a1
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion lib/loadPartials.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = function(dir) {
var file = utils.readWithoutBOM(partials[i]);
var name = path.basename(partials[i], ext);

this.Handlebars.registerPartial(name, file.toString() + '\n');
this.Handlebars.registerPartial(name, file.toString());
}
}
1 change: 0 additions & 1 deletion test/fixtures/data-page/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
Page: Yes, kittens.

Partial: Yes, kittens.

</body>
</html>
1 change: 0 additions & 1 deletion test/fixtures/data-page/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
Page: Yes, kittens.

Partial: Yes, kittens.

</body>
</html>
1 change: 0 additions & 1 deletion test/fixtures/partials/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<p>Body</p>
<p>Partial!</p>


</body>
</html>
1 change: 0 additions & 1 deletion test/fixtures/partials/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<p>Body</p>
<p>Partial!</p>


</body>
</html>
1 change: 0 additions & 1 deletion test/fixtures/variable-root/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<img src="image.jpg">
<img src="partial.png">


</body>
</html>
1 change: 0 additions & 1 deletion test/fixtures/variable-root/build/subfolder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<img src="../image.jpg">
<img src="../partial.png">


</body>
</html>
1 change: 0 additions & 1 deletion test/fixtures/variable-root/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<img src="image.jpg">
<img src="partial.png">


</body>
</html>
1 change: 0 additions & 1 deletion test/fixtures/variable-root/expected/subfolder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<img src="../image.jpg">
<img src="../partial.png">


</body>
</html>

0 comments on commit da102a1

Please sign in to comment.