Skip to content

Commit

Permalink
fix: kebab namespace cannot invert to camel correctly (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
qz1543706741 committed Oct 9, 2022
1 parent 99100e7 commit bbe3e7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/utils.ts
Expand Up @@ -139,7 +139,7 @@ export function getNameFromFilePath(filePath: string, options: ResolvedOptions):
if (globalNamespaces.some((name: string) => folders.includes(name)))
folders = folders.filter(f => !globalNamespaces.includes(f))

folders = folders.map(f => f.replace(/[^a-zA-Z0-9]/g, ''))
folders = folders.map(f => f.replace(/[^a-zA-Z0-9\-]/g, ''))

if (filename.toLowerCase() === 'index')
filename = ''
Expand Down

0 comments on commit bbe3e7f

Please sign in to comment.