JuliaWeb / Hyperscript.jl

Hyperscript: A lightweight DOM representation for Julia
Other
101 stars 11 forks source link

kebab function fix #41

Closed algunion closed 10 months ago

algunion commented 2 years ago

When trying to create an attribute with the key "_", the kebab function used for the attribute name normalization caused the "_" name to be mapped to "-_".

However, even if the input starts with a upper case character, the mapping from "T" to "-t" doesn't make much sense.

My use case involved the usage of _hyperscript (js) package where the events are created by defining the "_" attribute.

This small fix prevents the function to alter the 1-character inputs.