Skip to content

🐛 prevents coercion of space and underscore to minus#3134

Merged
joshhanley merged 3 commits intoalpinejs:mainfrom
ekwoka:bug-space-keydown
Nov 23, 2022
Merged

🐛 prevents coercion of space and underscore to minus#3134
joshhanley merged 3 commits intoalpinejs:mainfrom
ekwoka:bug-space-keydown

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

Comments