Fix spurious whitespace (#463)
This was introduced by #314 where `line` should have been `softline`. By the way, I was going to propose renaming `line` to `line_or_space` and `softline` to `line_or_nothing` which should make it more explicit what is going on. Fixes #461master
parent
d08c006902
commit
b4f1649d1a
|
@ -627,7 +627,7 @@ function genericPrintNoParens(path, options, print) {
|
|||
indent(options.tabWidth, concat([softline, printedValue]))
|
||||
])
|
||||
),
|
||||
line,
|
||||
softline,
|
||||
ifBreak(")")
|
||||
])
|
||||
);
|
||||
|
|
|
@ -77,6 +77,11 @@ const aLong = {
|
|||
},
|
||||
dHasALongName: \'a-long-value-too\'
|
||||
};
|
||||
|
||||
const aLong = {
|
||||
dHasALongName: \'a-long-value-too\',
|
||||
eHasABooleanExpression: a === a,
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const a = { b: true, c: { c1: \"hello\" }, d: false };
|
||||
|
||||
|
@ -88,6 +93,11 @@ const aLong = {
|
|||
},
|
||||
dHasALongName: \"a-long-value-too\"
|
||||
};
|
||||
|
||||
const aLong = {
|
||||
dHasALongName: \"a-long-value-too\",
|
||||
eHasABooleanExpression: a === a
|
||||
};
|
||||
"
|
||||
`;
|
||||
|
||||
|
@ -108,6 +118,11 @@ const aLong = {
|
|||
},
|
||||
dHasALongName: \'a-long-value-too\'
|
||||
};
|
||||
|
||||
const aLong = {
|
||||
dHasALongName: \'a-long-value-too\',
|
||||
eHasABooleanExpression: a === a,
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const a = { b: true, c: { c1: \"hello\" }, d: false };
|
||||
|
||||
|
@ -119,5 +134,10 @@ const aLong = {
|
|||
},
|
||||
dHasALongName: \"a-long-value-too\",
|
||||
};
|
||||
|
||||
const aLong = {
|
||||
dHasALongName: \"a-long-value-too\",
|
||||
eHasABooleanExpression: a === a,
|
||||
};
|
||||
"
|
||||
`;
|
||||
|
|
|
@ -14,3 +14,8 @@ const aLong = {
|
|||
},
|
||||
dHasALongName: 'a-long-value-too'
|
||||
};
|
||||
|
||||
const aLong = {
|
||||
dHasALongName: 'a-long-value-too',
|
||||
eHasABooleanExpression: a === a,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue