-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I am using a template like this
html
head
title "Hello " <%= ctx.opts.layout_name %>
body
divIt generates double \n per each newline causing this output
html
head
title "Hello " ssss
body
divIs this a bug or is there conf i missed.
My code:
te.template(view_template_file, function(template) {
var params = {
opts: opts
};
console.log({"params":params});
var templateResponse = template(params);
var file_content = [];
templateResponse.addListener("body", function(chunk) {
// chunk = chunk.replace(/\n\n/g,'\n') <-- to fix double \n
console.debug(chunk); // [DEBUG] "html\n\n head\n\n title \"Hello \" "
file_content.push(chunk);
});
templateResponse.addListener("complete", function() {
console.debug(file_content);
fs.writeFile(output_view_file, file_content.join(''), function(err) {
if(err) throw err;
console.log('It\'s saved!');
});
console.log("COMPLETE")
});
});Thanks
Great work.
Metadata
Metadata
Assignees
Labels
No labels