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

Newline between array values breaks indentation #793

Open
cweiske opened this issue Dec 6, 2024 · 0 comments
Open

Newline between array values breaks indentation #793

cweiske opened this issue Dec 6, 2024 · 0 comments

Comments

@cweiske
Copy link
Contributor

cweiske commented Dec 6, 2024

When a multi-line array contains an empty line, automatic indentation of the element after the newline is wrong (press tab on the baz line):

<?php
return [
    'foo' => 'bar',

        'baz' => 'bat'
];

The baz line should be indented by 4 spaces and not 8.

This problem appears in the following styles (C-c .):

  • psr2
  • symfony2
  • drupal
  • pear

Problem does not appear in:

  • wordpress
  • php

Related: #726
php-mode 20241024.1241
emacs 28.2

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

No branches or pull requests

1 participant