Formatting produces invalid code when comment is in pattern of a case expression
jfmengels opened this issue · 1 comments
jfmengels commented
When introducing a comment in a pattern in a case expression, elm-format
will reformat it like the following:
value =
case x of
A
-- comment
()
->
1
B
-- comment
->
1
Here, both branches are considered to be a syntax error. The ->
needs to be indented by at least one space (or move to after the ()
in the first pattern).
(more complete example: https://ellie-app.com/rHrcvrMP88Ha1)