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 Trimming of Excess Whitespace in Name #191

Closed

Conversation

chuahjiajie
Copy link

@chuahjiajie chuahjiajie commented Apr 13, 2024

Fixes #159

Did the same for address, roles, CCAs, and metadata

@chuahjiajie chuahjiajie added the bug Something isn't working label Apr 13, 2024
@chuahjiajie chuahjiajie added this to the v1.4 milestone Apr 13, 2024
@chuahjiajie chuahjiajie requested a review from a team April 13, 2024 14:12
@chuahjiajie chuahjiajie self-assigned this Apr 13, 2024
Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.74%. Comparing base (96a3e71) to head (c0bb976).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #191      +/-   ##
============================================
+ Coverage     65.73%   65.74%   +0.01%     
- Complexity      555      556       +1     
============================================
  Files            95       95              
  Lines          2174     2175       +1     
  Branches        219      219              
============================================
+ Hits           1429     1430       +1     
  Misses          663      663              
  Partials         82       82              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -27,6 +27,10 @@ public class ParserUtil {

public static final String MESSAGE_INVALID_INDEX = "Index is not a non-zero unsigned integer.";

public static String innerTrim(String string) {
return String.join(" ", string.split("\\s+"));

Choose a reason for hiding this comment

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

Okay so \s matches more than just spaces, like newlines. But ig we can just say we arent supporting any of the other whitespaces for now so im going to approve this trim.

However, can you edit it to String.join(" ", string.split("\\s+")).trim();? This is to handle when the string is like " uwu"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[PE-D][Tester B] Input for the application are not trimmed
2 participants