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 postfix-#if formatting when they come after a closing parenthesis. #554

Merged
merged 1 commit into from
Jun 28, 2023

Commits on Jun 28, 2023

  1. Fix postfix-#if formatting when they come after a closing parenthesis.

    A previous change caused the following formatting, which is less than ideal:
    
    ```swift
    SomeView(
      args
    )
      #if os(iOS)
        .someModifier()
      #endif
    ```
    
    In this case, the `#if` block should be at the same identation level as the
    closing parenthesis, similar to how we handle closing braces (`}`).
    
    This change moves the treatment of breaks for postfix-`#if` out of the
    visitor for `#if` clauses and instead uses the same contextual break
    previsition we use for other member access expressions. The result handles
    more cases correctly, and is a simpler, less special-casey implementation.
    allevato committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    09e7dd1 View commit details
    Browse the repository at this point in the history