Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve line length enforcement for breakables #397

Merged
merged 2 commits into from
Dec 21, 2022
Merged

Conversation

reese
Copy link
Collaborator

@reese reese commented Dec 20, 2022

Part of #379

This doesn't totally resolve our line-length woes, but it does get us closer to what I think users expect, which is that the render queue now takes into account both the current line length so far and the breakable's length when deciding whether or not to render it as a single- or multi-line.

Note that this only solves it for true breakables, but not for method calls and binary operators, which are currently hand-implemented due to having some more intricate special casings. Those will have to be resolved in later PRs and will generally be more involved.

@reese reese merged commit ac657fc into trunk Dec 21, 2022
@reese reese deleted the reese-line-length branch December 21, 2022 04:16
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.

2 participants