jsx: replace all newlines and excess whitespace with spaces - fixes #142
This commit is contained in:
parent
7d0dae129c
commit
cfee68aa67
@ -81,6 +81,11 @@ exports.XJSElement = {
|
||||
var children = node.children;
|
||||
|
||||
_.each(children, function (child) {
|
||||
if (t.isLiteral(child) && _.isString(child.value)) {
|
||||
child.value = child.value.trim().replace(/\n(\s+)/g, " ");
|
||||
if (!child.value) return;
|
||||
}
|
||||
|
||||
callExpr.arguments.push(child);
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user