diff --git a/lib/6to5/generator.js b/lib/6to5/generator.js index 333d68453f..8d8f8b7cc9 100644 --- a/lib/6to5/generator.js +++ b/lib/6to5/generator.js @@ -68,8 +68,8 @@ CodeGenerator.prototype.keyword = function (name) { this.push(" "); }; -CodeGenerator.prototype.push = function (str) { - if (this._indent) { +CodeGenerator.prototype.push = function (str, noIndent) { + if (this._indent && !noIndent) { // we have an indent level and we aren't pushing a newline var indent = this.getIndent(); diff --git a/lib/6to5/generators/template-literals.js b/lib/6to5/generators/template-literals.js index 5072cf2e5c..21e8399386 100644 --- a/lib/6to5/generators/template-literals.js +++ b/lib/6to5/generators/template-literals.js @@ -6,7 +6,7 @@ exports.TaggedTemplateExpression = function (node, print) { }; exports.TemplateElement = function (node, print) { - this.push(node.value.raw); + this.push(node.value.raw, true); }; exports.TemplateLiteral = function (node, print) {