input: add support for tildes in folder names (#135)

pull/138/head
Jason Millard 2021-07-20 11:39:53 -04:00 committed by GitHub
parent 4d6a166cb7
commit c56b66a41b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ class Input {
}
static isValidFolderName(folderName) {
const validFolderName = new RegExp(/^(\.|\.\/)?(\.?\w+([_-]?\w+)*\/?)*$/);
const validFolderName = new RegExp(/^(\.|\.\/)?(\.?[\w~]+([_-]?[\w~]+)*\/?)*$/);
return validFolderName.test(folderName);
}