Files
redmine/patches/project_identifier.patch
Roman Vaníček e904e193ad
Some checks failed
continuous-integration/drone/push Build is failing
Allow project identifier to start with digit.
2023-03-09 20:27:00 +01:00

12 lines
799 B
Diff

--- "a/public/javascripts/project_identifier.js"
+++ "b/public/javascripts/project_identifier.js"
@@ -55,7 +55,7 @@ function generateProjectIdentifier(identifier, maxlength) {
identifier = identifier.replace(diacriticsMap[i].letters, diacriticsMap[i].base);
}
identifier = identifier.replace(/[^a-z0-9_]+/gi, '-'); // remaining non-alphanumeric => hyphen
- identifier = identifier.replace(/^[-_\d]*|[-_]*$/g, ''); // remove hyphens/underscores and numbers at beginning and hyphens/underscores at end
+ identifier = identifier.replace(/^[-_]*|[-_]*$/g, ''); // remove hyphens/underscores and numbers at beginning and hyphens/underscores at end
identifier = identifier.toLowerCase(); // to lower
identifier = identifier.substr(0, maxlength); // max characters
return identifier;