Closed Wilfred closed 7 years ago
Does this cover the case where people do "x? y: z" or "case X :" or is it assuming a specific use of space?
case x :
should work because we just look for a line ending with :
inside a switch
block.
x? y: z
should also work because the line doesn't end with :
.
I agree that logic like this is tricky though. I believe the logic here works in the large majority of cases (though as it's line oriented, it may be possible to get incorrect indentation on large multiline expressions) but I think it's a worthwhile improvement over the current state of the code.
I think I am in "irritated" mode, so apologies, but do you think we should put tests in for these cases?
@russel added more tests, and fixed the issues they exposed :)
Fixes #40.