Skip to content

Commit

Permalink
fix(vite-plugin-angular): remove numbers from beginning of file name …
Browse files Browse the repository at this point in the history
…selector (#952)
  • Loading branch information
joshuamorony authored Mar 23, 2024
1 parent 532e299 commit 528a5d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite-plugin-angular/src/lib/authoring/analog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ function toFileName(str: string) {
return str
.replace(/([a-z\d])([A-Z])/g, '$1_$2')
.toLowerCase()
.replace(/(?!^[_])[ _]/g, '-');
.replace(/(?!^[_])[ _]/g, '-')
.replace(/^\d+-?/, '');
}
/**
* Capitalizes the first letter of a string
Expand Down

0 comments on commit 528a5d8

Please sign in to comment.