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

Plugin name with whitespaces does not become a slug separated by hyphens #63

Open
tomonic-x opened this issue Feb 15, 2023 · 2 comments

Comments

@tomonic-x
Copy link

{
  "plugin": {
    "name": "Good Plugin Name"
  }
}

Expected WPBP_PLUGIN_SLUG is good-plugin-name.
Actual WPBP_PLUGIN_SLUG is goodpluginname.

https://github.com/WPBP/generator/blob/master/generator/init.php#L37

@Mte90
Copy link
Member

Mte90 commented Feb 15, 2023

You are right, this shouldn't happen, probably is the preg_replace in the line you mentioned that strip the whitespace so the next function is not executed.

I will work on this ASAP.

@Mte90
Copy link
Member

Mte90 commented Feb 17, 2023

So I checked the behaviour of the generator and it was always in that way.
I think that it wasn't right as usually space is always replaced with a dash.
I am releasing now a new version with the fix.

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

No branches or pull requests

2 participants