Skip to content

Commit

Permalink
Fix regex for package renaming (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
uniformization authored Aug 27, 2023
1 parent 73cd62d commit 34f192e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void onRenamePackage() {

public CompletableFuture<Void> renamePackage(String path, String input) {
// validate input
if (input == null || !input.matches("[a-z0-9_/]+") || input.isBlank() || input.startsWith("/") || input.endsWith("/")) {
if (input == null || !input.matches("[a-zA-Z0-9_/]+") || input.isBlank() || input.startsWith("/") || input.endsWith("/")) {
this.gui.getNotificationManager().notify(Message.INVALID_PACKAGE_NAME);
return CompletableFuture.supplyAsync(() -> null);
}
Expand Down

0 comments on commit 34f192e

Please sign in to comment.