Skip to content

Commit 77c0064

Browse files
Update src/hooks/useId.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 10b5eab commit 77c0064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useId.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function resetUuid() {
2828
export function getId(prefix: string, key: string): string {
2929
// Valid id characters: letters, digits, hyphen, underscore, colon, period
3030
// Replace all invalid characters (including spaces) with hyphens to preserve length
31-
const sanitizedKey = key.replace(/[^a-zA-Z0-9-_:.]/g, '-');
31+
const sanitizedKey = key.replace(/[^a-zA-Z0-9_.:-]/g, '-');
3232

3333
return `${prefix}-${sanitizedKey}`;
3434
}

0 commit comments

Comments
 (0)