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

Fix adding right padding to empty string #253

Merged

Conversation

mikelorant
Copy link
Contributor

An empty string could not have padding applied on the right side.

Issue: #252

@mikelorant
Copy link
Contributor Author

@meowgorithm Can I get approval to run the workflows? Thanks.

@mikelorant
Copy link
Contributor Author

Can I get someone from @charmbracelet to review this. Thanks.

@meowgorithm meowgorithm self-requested a review January 30, 2024 21:01
Copy link
Member

@meowgorithm meowgorithm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this change makes sense to me. Do you mind adding a test as a proof?

An empty string could not have padding applied on the right side.

Issue: charmbracelet#252
Signed-off-by: Michael Lorant <michael.lorant@nine.com.au>
@mikelorant
Copy link
Contributor Author

Tests have been added. Needed a little refactor for the test function but now lets us control what text we render. Unit tests all passing.

@meowgorithm
Copy link
Member

Nice work, LGTM!

@meowgorithm meowgorithm merged commit 04def9d into charmbracelet:master Jan 30, 2024
9 checks passed
@mikelorant mikelorant deleted the fix/empty-string-pad-right branch January 30, 2024 22:39
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.

None yet

2 participants