We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
gregberge
Learn more about funding links in repositories.
Report abuse
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'
Successfully deployed to the following URLs:
svgr-git-main-gregberge.vercel.app svgr-gregberge.vercel.app api.react-svgr.com
1 commit comments
vercel[bot] commentedon Sep 28, 2022
Successfully deployed to the following URLs:
svgr – ./
svgr-git-main-gregberge.vercel.app
svgr-gregberge.vercel.app
api.react-svgr.com