don't mess with the indentation of TemplateElements

This commit is contained in:
Sebastian McKenzie 2014-11-01 23:26:48 +11:00
parent 2409b017db
commit 435b9434ea
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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) {