Inline template literals as arrow body (#1485)
Turns out I wrote the wrong one :( Fixes #1465master
parent
f59aeef865
commit
078572631f
|
@ -375,7 +375,7 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
n.body.type === "JSXElement" ||
|
||||
n.body.type === "BlockStatement" ||
|
||||
n.body.type === "TaggedTemplateExpression" ||
|
||||
n.body.type === "TemplateElement" ||
|
||||
n.body.type === "TemplateLiteral" ||
|
||||
n.body.type === "ArrowFunctionExpression"
|
||||
) {
|
||||
return group(collapsed);
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`arrow.js 1`] = `
|
||||
() => a\`
|
||||
a
|
||||
\`;
|
||||
|
||||
() => \`
|
||||
a
|
||||
\`;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
() => a\`
|
||||
a
|
||||
\`;
|
||||
|
||||
() => \`
|
||||
a
|
||||
\`;
|
||||
|
||||
`;
|
||||
|
||||
exports[`call.js 1`] = `
|
||||
insertRule(\`*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
() => a`
|
||||
a
|
||||
`;
|
||||
|
||||
() => `
|
||||
a
|
||||
`;
|
Loading…
Reference in New Issue