Handlebars/Spacebars formatting in Meteor

This option illuded me for sometime. I like using the HTML, JS, CSS prettify package to format my code nicely. But whenever it came to handlebars {{#if}} (aka Spacebars), it would format it to all be on the same line which screwed up my formatting and made me stop using the formatting in HTML templates. No more. Just go into the prettify package preferences and make this change:

From the default of this:
"indent_handlebars": false, // e.g. {{#foo}}, {{/foo}}

To this:
"indent_handlebars": true, // e.g. {{#foo}}, {{/foo}}

Leave a Reply

Your email address will not be published. Required fields are marked *