Skip to content

Commit

Permalink
Merge pull request #12803 from chamilaadhi/org_visibility
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
chamilaadhi authored Jan 30, 2025
2 parents e9dcf36 + 99b7b0d commit 6e5bd0a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11160,11 +11160,11 @@ public static String getOrganizationHandle(String name) {

String nowhitespace = WHITESPACE.matcher(name).replaceAll("-"); // Replace spaces with hyphens
String normalized = Normalizer.normalize(nowhitespace, Normalizer.Form.NFD); // Decompose Unicode characters
String slug = NONLATIN.matcher(normalized).replaceAll(""); // Remove non-alphanumeric characters
sanatizedName = NONLATIN.matcher(normalized).replaceAll(""); // Remove non-alphanumeric characters

// Convert to lowercase and trim hyphens from the beginning/end
slug = slug.toLowerCase(Locale.ENGLISH).replaceAll("^-+|-+$", "");
sanatizedName = sanatizedName.toLowerCase(Locale.ENGLISH).replaceAll("^-+|-+$", "");

return slug;
return sanatizedName;
}
}

0 comments on commit 6e5bd0a

Please sign in to comment.