Skip to content

Formatting issue with postfix if configs on main #392

Open
@DavidBrunow

Description

@DavidBrunow

I recently worked on #383 but noticed some behavior that I think is incorrect with the fix.

Given this code:

  EmptyView()
    .padding([.vertical])
  #if os(iOS)
    .iOSSpecificModifier()
  #endif  

The formatter incorrectly does not indent the .padding([.vertical]) on line 2:

Output:

  EmptyView()
  .padding([.vertical])
  #if os(iOS)
    .iOSSpecificModifier()
  #endif  

I have a potential fix and will put up a pull request soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions