Skip to content

fix: allow hyphens and spaces in theme generator theme name#4469

Open
Parth10P wants to merge 1 commit intosaadeghi:masterfrom
Parth10P:fix/theme-generator-hyphens
Open

fix: allow hyphens and spaces in theme generator theme name#4469
Parth10P wants to merge 1 commit intosaadeghi:masterfrom
Parth10P:fix/theme-generator-hyphens

Conversation

@Parth10P
Copy link

@Parth10P Parth10P commented Mar 18, 2026

Fixes #4387.
The theme generator silently discards all changes when the theme name contains a hyphen (e.g. my-theme) or a space (e.g. cringe classic). This is caused by an overly restrictive regex in themeGeneratorValidation.js that only accepts [a-z] characters.

changes made

  • Updated themeNamePattern in themeGeneratorValidation.js to allow lowercase letters, digits, spaces, and hyphens (while continuing to prevent them at the very start or end of the name).
  • Added .trim() to the validation pipeline so that trailing spaces typed by users don't temporarily break the validator or pollute the generated output.
Screen.Recording.2026-03-18.at.7.mp4

@saadeghi saadeghi self-assigned this Mar 18, 2026
@Parth10P
Copy link
Author

@saadeghi is anything need's to be change or edits..?

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.

bug: theme generator is not saving changes if new theme contains -

2 participants