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

printf: Fix extra padding space and wrong position of - when padding #6520

Closed
wants to merge 7 commits into from

Conversation

Kev1n8
Copy link
Contributor

@Kev1n8 Kev1n8 commented Jul 1, 2024

should fix #6519 and #2774.
added some padding tests and fix the incorrect behaviors of padding

@Kev1n8 Kev1n8 marked this pull request as ready for review July 2, 2024 04:14
@Kev1n8 Kev1n8 requested a review from sylvestre July 5, 2024 07:42
@Kev1n8
Copy link
Contributor Author

Kev1n8 commented Jul 6, 2024

Just added a case check, should fix the remaining issue in #2774. Before this, there was a incorrect output as following:
Screenshot 2024-07-06 at 15 22 30

@sylvestre
Copy link
Sponsor Contributor

Just added a case check, should fix the remaining issue in #2774. Before this, there was a incorrect output as following: Screenshot 2024-07-06 at 15 22 30

could you please replace the screenshot by text? it is terrible for accessibility and search. thanks

@Kev1n8
Copy link
Contributor Author

Kev1n8 commented Jul 6, 2024

could you please replace the screenshot by text? it is terrible for accessibility and search. thanks

Sorry for my carelessness. The incorrect output text is as following:
/coreutils printf "%+5.1f" 2
+ 2.0%

@Kev1n8 Kev1n8 requested a review from sylvestre July 7, 2024 09:11
@Kev1n8 Kev1n8 closed this Jul 7, 2024
@Kev1n8 Kev1n8 deleted the fix-extra-padding branch July 7, 2024 11:34
@Kev1n8 Kev1n8 restored the fix-extra-padding branch July 7, 2024 11:38
@Kev1n8
Copy link
Contributor Author

Kev1n8 commented Jul 7, 2024

sorry, that was an accident.

@Kev1n8 Kev1n8 mentioned this pull request Jul 7, 2024
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.

printf: extra spaces if padding number is not next to %
2 participants