Skip to content

Commit 2de337d

Browse files
ci: apply automated fixes
1 parent e2e62ba commit 2de337d

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

packages/router-generator/src/utils.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -295,28 +295,28 @@ const splitPathRegex = /[/-]/g
295295
const leadingDigitRegex = /^(\d)/g
296296

297297
const toVariableSafeChar = (char: string): string => {
298-
if (alphanumericRegex.test(char)) {
299-
return char // Keep alphanumeric characters and underscores as is
300-
}
298+
if (alphanumericRegex.test(char)) {
299+
return char // Keep alphanumeric characters and underscores as is
300+
}
301301

302-
// Replace special characters with meaningful text equivalents
303-
switch (char) {
304-
case '.':
305-
return 'Dot'
306-
case '-':
307-
return 'Dash'
308-
case '@':
309-
return 'At'
310-
case '(':
311-
return '' // Removed since route groups use parentheses
312-
case ')':
313-
return '' // Removed since route groups use parentheses
314-
case ' ':
315-
return '' // Remove spaces
316-
default:
317-
return `Char${char.charCodeAt(0)}` // For any other characters
318-
}
302+
// Replace special characters with meaningful text equivalents
303+
switch (char) {
304+
case '.':
305+
return 'Dot'
306+
case '-':
307+
return 'Dash'
308+
case '@':
309+
return 'At'
310+
case '(':
311+
return '' // Removed since route groups use parentheses
312+
case ')':
313+
return '' // Removed since route groups use parentheses
314+
case ' ':
315+
return '' // Remove spaces
316+
default:
317+
return `Char${char.charCodeAt(0)}` // For any other characters
319318
}
319+
}
320320

321321
export function routePathToVariable(routePath: string): string {
322322
const cleaned = removeUnderscores(routePath)

0 commit comments

Comments
 (0)