Skip to content

Fix unstable formatting issues#267

Merged
JohnnyMorganz merged 3 commits intomasterfrom
unstable-formatting
Sep 14, 2021
Merged

Fix unstable formatting issues#267
JohnnyMorganz merged 3 commits intomasterfrom
unstable-formatting

Conversation

@JohnnyMorganz
Copy link
Owner

Fixes #261 (OP) - caused by a singleline table just hitting the column width, with initially no spaces between braces. We did not correctly calculate the column width in this case.

Fixes #257 - for the top-level binop expression, we did not take into account whether we hung the RHS of the expression and its precedence level. This led to an asymmetric formatting, which did not look as nice. This was also presented as a comment in #261 leading to unstable formatting.

Caused by singleline table just hitting column width
initially with no spaces between braces
We did not look at the RHS precedence level when determining to hang an expression.
This led to assymetric formatting, which doesn't look as nice.

This also led to an unstable formatting issue in #261
@JohnnyMorganz JohnnyMorganz merged commit 9461088 into master Sep 14, 2021
@JohnnyMorganz JohnnyMorganz deleted the unstable-formatting branch September 14, 2021 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple runs with different output misformatting due to precedence issue with or and ~=

1 participant