-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Preserving line breaks between sentences according to the exception message #24219
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
Conversation
yceruto
commented
Sep 15, 2017
•
edited
Loading
edited
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #24212 |
License | MIT |
Doc PR | - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for preserving lines. Think intention was pure for cosmetic reasons.
@@ -1133,9 +1133,8 @@ private function splitStringByWidth($string, $width) | |||
$lines[] = str_pad($line, $width); | |||
$line = $char; | |||
} | |||
if ('' !== $line) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yceruto i think this is trimming related in fact :)
throw new \Exception("\n\nline 1 with extra spaces \nline 2\n\nline 4\n");
So here's a better test ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
63994c6
to
dba55ef
Compare
dba55ef
to
e2d4904
Compare
Thanks for fixing this bug Yonel. |
…ng to the exception message (yceruto) This PR was merged into the 2.7 branch. Discussion ---------- [Console] Preserving line breaks between sentences according to the exception message | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24212 | License | MIT | Doc PR | - Commits ------- e2d4904 Render all line breaks according to the exception message