We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dbc3e2 commit 6ee639aCopy full SHA for 6ee639a
packages/core/src/state.test.ts
@@ -24,6 +24,11 @@ describe('state', () => {
24
filePath: 'a&b~c-d_e.svg',
25
componentName: 'SvgAbcDE',
26
})
27
+ expect(expandState({ filePath: 'Arrow up.svg' })).toEqual({
28
+ filePath: 'Arrow up.svg',
29
+ componentName: 'SvgArrowUp',
30
+ })
31
+
32
33
34
packages/core/src/state.ts
@@ -13,7 +13,7 @@ export interface State {
13
}
14
15
16
-const VALID_CHAR_REGEX = /[^a-zA-Z0-9_-]/g
+const VALID_CHAR_REGEX = /[^a-zA-Z0-9 _-]/g
17
18
const getComponentName = (filePath?: string): string => {
19
if (!filePath) return 'SvgComponent'
0 commit comments