Skip to content

Commit 51a3115

Browse files
authored
Merge pull request #4249 from OSC/bp-js-bugfix
account for clusters with - or _ characters (#4245)
2 parents aba4d2e + 205143c commit 51a3115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/dashboard/app/javascript/dynamic_forms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function snakeCaseWords(str) {
9696

9797
// find all the captial case words and if none are found, we'll just bascially
9898
// return the same string.
99-
const rex = /([A-Z]{1}[a-z]*[0-9]*)|.+/g;
99+
const rex = /([A-Z]{1}[a-z]*[0-9]*)|([^-_]+)/g;
100100
const words = str.match(rex);
101101

102102
// filter out emtpy matches to avoid having a _ at the end.

0 commit comments

Comments
 (0)