nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.63k stars 623 forks source link

Hoist try error with multi line string #1642

Closed bramseynhaeve closed 3 months ago

bramseynhaeve commented 3 months ago

The try keyword is moved in front of a multiline string in the following code snippet:

original

let json = """
{
  "foo": "bar"
}
"""

someFunction(try  parse(json), "someKey")

Current result

let json = try """
{
  "foo": "bar"
}
"""

someFunction(parse(json), "someKey")
nicklockwood commented 3 months ago

@bramseynhaeve fixed in 0.53.5