Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support spaces in source file names #779

Merged
merged 1 commit into from
Sep 28, 2022

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.

None yet

2 participants