Skip to content

Commit

Permalink
added preventIndent to hbs.compile (#58)
Browse files Browse the repository at this point in the history
* addded preventIndent to hbs.compile

* some spaces

* added some spaces

* end space
  • Loading branch information
jeanrodriguez authored and jonwinton committed Feb 21, 2019
1 parent 3126496 commit 2437a77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ function registerPartials(items) {
// Compile all the loaded partials
_.forIn(hbs.partials, function (value, key) {
if (_.isString(value)) {
hbs.partials[key] = hbs.compile(value);
// preventIndent:true solve issue with <pre> tag/white-space: pre
// see http://handlebarsjs.com/reference.html compile() options
hbs.partials[key] = hbs.compile(value, { preventIndent: true });
}
});

Expand Down

0 comments on commit 2437a77

Please sign in to comment.