diff --git a/lib/6to5/generation/generators/jsx.js b/lib/6to5/generation/generators/jsx.js index 1e839feaf1..567d24d70c 100644 --- a/lib/6to5/generation/generators/jsx.js +++ b/lib/6to5/generation/generators/jsx.js @@ -46,15 +46,11 @@ exports.XJSElement = function (node, print) { this.indent(); _.each(node.children, function (child) { - if (t.isLiteral(child) && typeof child.value === "string") { - if (/\S/.test(child.value)) { - return self.push(child.value.replace(/^\s+|\s+$/g, "")); - } else if (/\n/.test(child.value)) { - return self.newline(); - } + if (t.isLiteral(child)) { + self.push(child.value); + } else { + print(child); } - - print(child); }); this.dedent();