We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0f278e1 + 7538b85 commit 982cb2dCopy full SHA for 982cb2d
bin/handlebars
@@ -70,6 +70,11 @@ var optimist = require('optimist')
70
'description': 'Template extension.',
71
'alias': 'extension',
72
'default': 'handlebars'
73
+ },
74
+ 'b': {
75
+ 'type': 'boolean',
76
+ 'description': 'Removes the BOM (Byte Order Mark) from the beginning of the templates.',
77
+ 'alias': 'bom'
78
}
79
})
80
@@ -147,6 +152,10 @@ function processTemplate(template, root) {
147
152
});
148
153
} else {
149
154
var data = fs.readFileSync(path, 'utf8');
155
+
156
+ if (argv.bom && data.indexOf('\uFEFF') === 0) {
157
+ data = data.substring(1);
158
+ }
150
159
151
160
var options = {
161
knownHelpers: known,
0 commit comments