+2

un-indented line after closing php tag

cresus18 13 year бұрын updated by Alex van der Vegt 12 year бұрын 3
I have noticed a new bug introduced with the latest build 2181 which is rather annoying.

Suppose you were to type some PHP interlaced in some HTML, with some levels of indentation, as follows:

<div clas="level-1">
    <div class="level-2">
        <?php if(true): ?>
        <p>true</p>
        <?php elseif(false): ?>
        <p>false</p>
        <?php else: ?>
        <p>???</p>
        <?php endif; ?>
    </div>
</div>

When you close the PHP after 'elseif', 'else', or 'endif', it un-indent the line automatically by removing one tab.

This doesn't happen for the 'if', but also happens when using 'endforeach' and endwhile', and probably other similar PHP condition keywords.

This bug doesn't occur if you were to use curly brackets '{ }' instead of semi-colons ':'.
For whoever who are so quick to vote against this bug, could you please explain why? If it's not a bug, is there some kind of setting to prevent this behaviour? Or do you simply not want to see this bug fixed one day? I'd be pretty interested to have your comments. Thanks

Hello!


Did somebody maybe find the solution/workaround for this behaviour? I have the same problem.


Thanks!

I am facing this issue also. Very annoying when write wordpress or magento code.