-
Notifications
You must be signed in to change notification settings - Fork 18
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
Implement extension function to remove orphan words #566
Conversation
📲 You can test the changes from this Pull Request in Gravatar Demo by scanning the QR code below to install the corresponding build.
|
1a74283
to
3b8a117
Compare
I like this in principle, but I'm not sure we need a new composable for that. We could just keep the extension function from this PR and apply it to every |
That makes sense, I will remove it. |
3b8a117
to
ea2762a
Compare
@@ -0,0 +1,8 @@ | |||
package com.gravatar.quickeditor.ui | |||
|
|||
internal val String.removeOrphans: String |
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.
Can we add a unit test for this function?
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.
Sure!
ea2762a
to
7eba37b
Compare
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!
Closes #565
Description
This PR adds a String extension that inserts a non-breaking space before the last word to make sure no orphan words are left in the last line. It's used in the
QESectionMessage
Testing Steps
Choose or upload your favorite avatar images and connect them to your email address.
will never have orphans.