Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastian McKenzie
4f18ed406c v1.11.15 2014-11-11 17:17:08 +11:00
Sebastian McKenzie
4d8e5f728a 1.11.15 2014-11-11 17:16:11 +11:00
Sebastian McKenzie
54857ceac7 fix jsx literal generator - closes #143 2014-11-11 17:15:37 +11:00
3 changed files with 9 additions and 9 deletions

View File

@@ -1,3 +1,7 @@
# 1.11.15
* Fix JSX literal whitespace generation.
# 1.11.14
* Avoid using a switch for let-scoping continue and break statements and use an if statement instead.

View File

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

View File

@@ -1,7 +1,7 @@
{
"name": "6to5",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "1.11.14",
"version": "1.11.15",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://github.com/6to5/6to5",
"repository": {