Do not break before `+` (#1777)
We really want to parse those as binary expressions but it's not going to be trivial. A quick fix that should help is to not break before those.master
parent
122bb65f16
commit
6f72e278e9
|
@ -2648,9 +2648,16 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
n.groups[i + 1].raws &&
|
||||
n.groups[i + 1].raws.before !== ""
|
||||
) {
|
||||
if (
|
||||
n.groups[i + 1].type === "value-operator" &&
|
||||
["+", "-", "/", "*", "%"].indexOf(n.groups[i + 1].value) !== -1
|
||||
) {
|
||||
parts.push(" ");
|
||||
} else {
|
||||
parts.push(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return group(indent(concat(parts)));
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ exports[`indent.css 1`] = `
|
|||
div {
|
||||
background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 repeat-y;
|
||||
box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15);
|
||||
padding-bottom: calc(var(ads-help-tray-footer-with-support-link-height) + var(ads-help-tray-header-height-new));
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
div {
|
||||
|
@ -14,6 +15,10 @@ div {
|
|||
repeat-y;
|
||||
box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75),
|
||||
0 1px 1px rgba(0, 0, 0, 0.15);
|
||||
padding-bottom: calc(
|
||||
var(ads-help-tray-footer-with-support-link-height) +
|
||||
var(ads-help-tray-header-height-new)
|
||||
);
|
||||
}
|
||||
|
||||
`;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
div {
|
||||
background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 repeat-y;
|
||||
box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15);
|
||||
padding-bottom: calc(var(ads-help-tray-footer-with-support-link-height) + var(ads-help-tray-header-height-new));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue