-
Notifications
You must be signed in to change notification settings - Fork 175
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
Trim whitespace at the end of messages #2169
Trim whitespace at the end of messages #2169
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2169 +/- ##
========================================
Coverage 66.98% 66.99%
========================================
Files 1376 1376
Lines 34193 34201 +8
Branches 7441 7443 +2
========================================
+ Hits 22905 22912 +7
Misses 7672 7672
- Partials 3616 3617 +1 ☔ View full report in Codecov by Sentry. |
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.
LGTM, but this code will trim only the last line, IIUC how trimEnd()
works. Would it have sense to trimEnd
all lines of the message? For instance having (with _
replacing
for clarity):
a____
b__
c
become
a
b
c
?
We could replace trimEnd()
with lines().joinToString(transform = String::trimEnd, separator = "\n")
to do it.
On the other side I do not really like to apply post treatment on Events that have been sent...
This doesn't seem to solve the issue in the ping room, because I think you're only trimming the |
Sorry, you're right. I applied the |
899900f
to
a67f9ea
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Type of change
Content
Trim whitespace at the end of both formatted and plain text messages. We don't trim leading whitespace in case it's used for formatting or some nice ASCII art.
Motivation and context
Fixes #2099.
Screenshots / GIFs
Tests
In the timeline those extra whitespace chars should be gone.
Tested devices
Checklist