Skip to content

Commit

Permalink
fix: replace underscores when suggesting UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekyEggo committed Feb 19, 2024
1 parent 0a1ab5e commit 13da521
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stream-deck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export function getSafeValue(value: string | undefined): string | undefined {
const safeValue = value
.toLowerCase()
.replaceAll(" ", "-")
.replaceAll(/[^\-a-z0-9_]/g, "");
.replaceAll("_", "-")
.replaceAll(/[^-a-z0-9]/g, "");

return safeValue !== "" ? safeValue : undefined;
}
Expand Down

0 comments on commit 13da521

Please sign in to comment.