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

🐛 prevents coercion of space and underscore to minus #3134

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

ekwoka
Copy link
Contributor

@ekwoka ekwoka commented Sep 4, 2022

Addresses bug found in #3124

This PR:

  • Prevents ' ' and '_' from being coerced into '-' in the kebabcase function.
  • Adds test for these cases.
  • Adds the modifier minus and underscore as aliases for - and _ when using them as @keydown modifiers.

This will break any apps that actually depends on this coercion, but I don't think that would be an expected behavior that anyone would be relying on.

Expanding the keydown modifiers test introduced some issues regarding ensuring the these options were all treated separately without overlap.
Co-authored-by: Marc Reichel <[email protected]>
@joshhanley joshhanley merged commit df21e2a into alpinejs:main Nov 23, 2022
@joshhanley
Copy link
Collaborator

Looks good, thanks!

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.

4 participants