Skip to content

Commit

Permalink
capture spaces in rename filter
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamKelley committed Jul 10, 2021
1 parent ac015c8 commit 7c7b217
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/spark-icons/defaults/renameFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function myDestRewriter(svgPathObj) {
fileName = fileName
.replace(/.svg/, '.tsx')
.replace(
/(^.)|(_)(.)|( - )(.)|( )(.)/g,
/(^.)|(\s*_\s*)(.)|(\s*-\s*)(.)|(\s*)(.)/g,
(match, p1, p2, p3, p4, p5, p6, p7) =>
(p1 || p3 || p5 || p7).toUpperCase()
);
Expand Down

0 comments on commit 7c7b217

Please sign in to comment.