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

fix: use breakable instead of unbreakable whitespace when formatting tokens #5513

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

kmill
Copy link
Collaborator

@kmill kmill commented Sep 29, 2024

The formatter was using tk ++ " " to separate tokens from tokens they would merge with, but " " is not whitespace that can break. This affected large binder lists, which wouldn't pretty print with any line breaks. Now they can be flowed across multiple lines.

Closes #5424

…tokens

The formatter was using `tk ++ " "` to separate tokens from tokens they would merge with, but `" "` is not whitespace that could merge. This affected large binder lists, which wouldn't pretty print with any line breaks. Now they can be flowed across multiple lines.

Closes leanprover#5424
@kmill kmill requested a review from Kha as a code owner September 29, 2024 02:09
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Sep 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Sep 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Sep 29, 2024
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Sep 29, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Sep 29, 2024

Mathlib CI status (docs):

@leanprover-community-bot leanprover-community-bot added builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Sep 29, 2024
@kmill kmill added this pull request to the merge queue Sep 29, 2024
Merged via the queue into leanprover:master with commit 40d6a6d Sep 29, 2024
19 checks passed
@david-christiansen
Copy link
Contributor

Glorious! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signature formatter creates very long lines when many parameters share a type
3 participants