Open mwnciau opened 3 years ago
On a second look, this might be intended behaviour, but nonetheless I find it confusing. This only happens after the if block in an if-else statement.
It seems more intuitive to me that the // if ( $condition ) should come at the end of the if block, not at the end of the else block.
Yeah, I agree. The output will need some fine tuning. That is my mistake. My testing dataset just doesn't have that formatting in it. I will work on that this weekend probably.
I did some fiddling.
Here is the result:
It isn't perfect, but I think it improves on the else with brackets on the same line as well. I'm thinking the if being shown on the very last part of an else is intended at this point. We just annotate the middle bracket now too.
If you want to toy around with it more, I have a working branch going: https://github.com/code-biscuits/assorted-biscuits/tree/language-specific-filters
If you think its good enough, I can get a release out after some cleanup.
e.g.
Shows the biscuit:
Presumably an issue in other languages, too, where the coding style is to place brackets on a new line.