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

Indent multiline messages in say_status #714

Merged

Conversation

jonathanhefner
Copy link
Member

This prevents multiline status messages from breaking the left margin.

As an example, before this commit:

     status1  single line
     status2  multiline line 1
multiline line 2
multiline line 3
     status3  multiline indent 0
  multiline indent 2
    multiline indent 4
     status4  single line

And after this commit:

     status1  single line
     status2  multiline line 1
              multiline line 2
              multiline line 3
     status3  multiline indent 0
                multiline indent 2
                  multiline indent 4
     status4  single line

Closes rails/rails#38387.

This prevents multiline status messages from breaking the left margin.

As an example, before this commit:

```
     status1  single line
     status2  multiline line 1
multiline line 2
multiline line 3
     status3  multiline indent 0
  multiline indent 2
    multiline indent 4
     status4  single line
```

And after this commit:

```
     status1  single line
     status2  multiline line 1
              multiline line 2
              multiline line 3
     status3  multiline indent 0
                multiline indent 2
                  multiline indent 4
     status4  single line
```
@alexpapworth
Copy link

@rafaelfranca any chance we can merge this one?

@dorner
Copy link

dorner commented Jun 1, 2021

I like this change but it might be breaking behavior since existing usage may be compensating for this by adding more spaces. @rafaelfranca is this something we should leave for a major version bump? Or add a flag for this behavior as an argument?

@rafaelfranca rafaelfranca merged commit 87d73c1 into rails:master Jun 2, 2021
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 this pull request may close these issues.

4 participants