fix jsx literal generator - closes #143
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user