Open indigo0086 opened 7 years ago
I just ran into this as well, and not even on a nested if.
Here is the statement I have that causes an incorrect indentation on the second else if
line
viewValidation model =
let
(color, message) =
if model.password /= model.passwordAgain then
("red", "Passwords do not match!")
else if String.length model.password < 9 then
("red", "Password needs to be longer than eight characters")
else if
else
("green", "OK")
I have the same issue, hope it gets resolved.
I'd just like to point out that the issue arises with a single else if
, I think it's just not accounted for in indent
. It doesn't need to be nested
Yeah, it's all a bit inscrutable to me, tbh, since it began as a mangled haskell indentation system.
When attempting to do a nested else-if then form inside an if form the indentation adds extraneous spacing and you are unable to cycle proper indentation. I use elm-format to correct it of course but the cycling seems to not be elm specific. Asking around on twitter I was informed that it is using a haskell format instead of elm specific for tab cycling. Here is a small recording