Skip to content

Support spaces in source file names#779

Merged
gregberge merged 1 commit intogregberge:mainfrom
jamonserrano:support-space-in-file-names
Sep 28, 2022
Merged

Support spaces in source file names#779
gregberge merged 1 commit intogregberge:mainfrom
jamonserrano:support-space-in-file-names

Conversation

@jamonserrano
Copy link
Contributor

Summary

Currently source file names that have spaces in them are not converted to component names the same way as the file names, e.g. from Arrow up.svg the component name will be SvgArrowup and the file name will be SvgArrowUp.tsx.

The PR fixes this discrepancy by not removing spaces from the file names before converting them to PascalCase.

Test plan

Added a test case.

@vercel
Copy link

vercel bot commented Sep 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
svgr ✅ Ready (Inspect) Visit Preview Sep 26, 2022 at 0:38AM (UTC)

@jamonserrano jamonserrano changed the title Support spaces in file names Support spaces in source file names Sep 26, 2022
@gregberge gregberge merged commit 6ee639a into gregberge:main Sep 28, 2022
@gregberge
Copy link
Owner

Thanks @jamonserrano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants