Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commented out array elements break indentation #726

Closed
flaviovs opened this issue Jan 25, 2023 · 2 comments · Fixed by #732
Closed

Commented out array elements break indentation #726

flaviovs opened this issue Jan 25, 2023 · 2 comments · Fixed by #732

Comments

@flaviovs
Copy link

Correctly indented by php-mode:

<?php
$a = [
    'aaa' => [
        'bee' => 2,
    ],
    'foo' => [
         'bar' => 1,
    ],
    'lee' => 2,
];

Comment out an array element:

<?php
$a = [
    'aaa' => [
        'bee' => 2,
    ],
    // 'foo' => [
    //      'bar' => 1,
    // ],
    'lee' => 2,
];

Request auto-indentation (i.e., Tab over lines, indent-region, etc.):

<?php
$a = [
    'aaa' => [
        'bee' => 2,
    ],
    // 'foo' => [
        //      'bar' => 1,
        // ],
        'lee' => 2,
];
  • php-mode 20230103.1226
  • (php-enable-psr2-coding-style)
zonuexe added a commit that referenced this issue Mar 5, 2023
zonuexe added a commit that referenced this issue Mar 5, 2023
@zonuexe zonuexe closed this as completed in 31220ab Mar 5, 2023
zonuexe added a commit that referenced this issue Mar 5, 2023
@zonuexe
Copy link
Member

zonuexe commented Mar 5, 2023

@flaviovs Thank you for reporting, maybe fixed in #732.

@flaviovs
Copy link
Author

flaviovs commented Mar 6, 2023

Hi @zonuexe,

I confirm, after upgrading to latest on MELPA (20230305.2120) the issue is gone.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants