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

FormatWriter: accumulate align shift correctly #3615

Merged
merged 2 commits into from
Aug 18, 2023

Commits on Aug 18, 2023

  1. Configuration menu
    Copy the full SHA
    7623d41 View commit details
    Browse the repository at this point in the history
  2. FormatWriter: accumulate align shift correctly

    Alignment logic accumulates alignment shift for matching lines, with the
    assumption that the extra space will definitely be added.
    
    However, we don't add extra spaces to no-split cases, instead attempting
    to delay them until the next token... but if the next token is also a
    no-split, then the extra alignment space is lost, leading to incorrect
    formatting.
    
    One such example is `(` which typically has no spaces before or after.
    kitbellew committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    cfbe830 View commit details
    Browse the repository at this point in the history