Closed vthunder closed 10 years ago
To drive the point home, here is what happens if you play around with the anonymous function definition so it ends up indented further:
function() foo {
doSomething(
function() {
switch (bar) {
case "1":
blah();
break;
case "2":
blah();
break;
}
});
}
Or even the hilarious:
function() foo {
doSomething(function()
{
switch (bar) {
case "1":
blah();
break;
case "2":
blah();
break;
}
});
}
See, this is why one shouldn't merge code without tests.
By the way, function() foo {
is totally not JavaScript.
omg, what a horrible typo. But thanks for fixing so quickly! I just updated, and it works great.
I was excited when I saw #90, but I think it's still broken in the second case below:
I want the label to align with the switch statement (or be indented one level in from there, I don't actually care so much). It ends up aligning with the scope outside the anonymous function, which is wrong.