-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict the kinds of expressions that force a .concat call split
This avoids creating extra .concat calls unless the result could be potentially observably different from real template evaluation.
- Loading branch information
Diogo Franco (Kovensky)
committed
Aug 12, 2017
1 parent
9243c78
commit 86adc6f
Showing
5 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...el-plugin-transform-es2015-template-literals/test/fixtures/spec/escape-quotes/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
var t = "'".concat(foo, "' \"").concat(bar, "\""); | ||
var t = "'".concat(foo, "' \"", bar, "\""); |
2 changes: 1 addition & 1 deletion
2
.../babel-plugin-transform-es2015-template-literals/test/fixtures/spec/functions/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
var foo = "test ".concat(_.test(foo), " ").concat(bar); | ||
var foo = "test ".concat(_.test(foo), " ", bar); |
2 changes: 1 addition & 1 deletion
2
...s/babel-plugin-transform-es2015-template-literals/test/fixtures/spec/literals/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
var foo = "".concat(1, f, "oo", true).concat(b, "ar", 0).concat(baz); | ||
var foo = "".concat(1, f, "oo", true, b, "ar", 0, baz); |
2 changes: 1 addition & 1 deletion
2
...s/babel-plugin-transform-es2015-template-literals/test/fixtures/spec/multiple/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
var foo = "test ".concat(foo, " ").concat(bar); | ||
var foo = "test ".concat(foo, " ", bar); |