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

Return with multi-line strings indents strangely #227

Closed
jdufresne opened this issue Mar 3, 2015 · 3 comments · Fixed by #777
Closed

Return with multi-line strings indents strangely #227

jdufresne opened this issue Mar 3, 2015 · 3 comments · Fixed by #777

Comments

@jdufresne
Copy link
Contributor

Observe the following test case:

The buffer has been indented automatically.

<?php


function my_other_func() {
    return "anoter really long string " .
                                        "some more text";
}

function my_func() {
    return "a really long string with = inside " .
                                      "some more text";
}

I would expect the second line of the strings to:

  1. Indent consistently (the = messes with things)
  2. Indent simply by c-basic-offset
@syohex
Copy link
Collaborator

syohex commented Mar 4, 2015

Indent consistently (the = messes with things)

I fixed and sent PR #229. Its screencast is here

php-mode-227

Indent simply by c-basic-offset

Which coding style do you use ? And does it define coding style about multi line strings ?
If you don't need many spaces, you can write like this.

function my_func() {
    return "a really long string with = inside "
        . "some more text";
}

@syohex
Copy link
Collaborator

syohex commented Mar 4, 2015

@jdufresne I have merged PR #229. Please check latest version.

@cweiske
Copy link
Contributor

cweiske commented Jan 6, 2024

This is fixed with the merged patch.

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.

3 participants