bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.63k stars 94 forks source link

Another wrong formatting #1098

Open kanlukasz opened 4 years ago

kanlukasz commented 4 years ago

Describe the bug Wrong formatting

To Reproduce

<?php if ($count_rest == 1) : ?>
    <div class="row row-cols-1 row-cols-md-2 text-center">
    <?php endif; ?>

    <?php the_excerpt(); ?>

    <?php if ($query_blog->current_post + 1 == $query_blog->post_count) : ?>
    </div>
<?php endif; ?>

Expected behavior

<?php if ($count_rest == 1) : ?>
    <div class="row row-cols-1 row-cols-md-2 text-center">
<?php endif; ?>

<?php the_excerpt(); ?>

<?php if ($query_blog->current_post + 1 == $query_blog->post_count) : ?>
    </div>
<?php endif; ?>

Platform and version

Version: 1.44.2 (system setup)
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T16:36:23.138Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363
_Addon version: latest_
bmewburn commented 5 months ago

There's no plans to support formatting unbalanced elements within control statements.