[#2334] removed first char lowercase normalization to comply with the common backend regex

This commit is contained in:
Gani Georgiev committed 2023-04-21 19:03:59 +03:00
1 parent b31c2ceffa
commit f2a011d63f
30 files changed
+37 -39

No files matched your search

+1 -3
View File
@@ -599,12 +599,10 @@ export default class CommonHelper {
str = str.replace(specialCharsMap[k], k);
}
const slug = str
return str
.replace(new RegExp('[' + preserved.join('') + ']', 'g'), ' ') // replace preserved characters with spaces
.replace(/[^\w\ ]/gi, '') // replaces all non-alphanumeric with empty string
.replace(/\s+/g, delimiter); // collapse whitespaces and replace with `delimiter`
return slug.charAt(0).toLowerCase() + slug.slice(1);
}
/**