avh4 / elm-format

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide
BSD 3-Clause "New" or "Revised" License
1.31k stars 148 forks source link

Non-idempotent list formatting #760

Open avh4 opened 2 years ago

avh4 commented 2 years ago

input:

x = [ 1, 2 {- A -} ]

first pass:

x =
    [ 1, 2

    {- A -}
    ]

second pass:

x =
    [ 1
    , 2

    {- A -}
    ]
avh4 commented 2 years ago

I think the first pass formatting to the second pass is correct. Arguably the original input should remain unchanged.