-
Notifications
You must be signed in to change notification settings - Fork 35
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
kebab case doesn't treat numbers as separate word? #18
Comments
It's unfortunate that there is no behaviour here that is obvious to everybody, but this has been the default behaviour for both heck and serde (as I mentioned on that other issue) for a long time, so I think it would be a very bad idea to change it for everybody. I think it would be feasible to expose an API that supports this, but that would require some refactoring and also afterwards strum would have to add support for it. Are you interested in working on that? |
Not sure if I will have the time for this in the near future. |
Alright, I've posted this to This Week in Rust's Call for Participation section. Maybe sbd. else wants to work on it 🙂 So my idea is that this could work as
|
Adding on to the ‘please don’t change this’ pile - this would be a very invasive breaking change for prost users if enabled by default. As for configuration APIs, quoting from the README:
|
So to be clear: I've taken over maintenance of this crate, that's why I wrote some instructions about how to do this and posted it to CfP. Further, changing the default is not an option being discussed here. This is only about having some customization options, for those who need it. You have a point about that bit from the README, but I think the treatment of numbers is something that would deserve some customization options, and I think the |
ConvertCase implements convert_case() which accepts customization options to tweak behaviour of other case conversion functions. Currently, it accepts `number_starts_word` option to have word boundaries when characters in a word change from numeric to alphabetic or vice versa. Other case conversion functions are implemented in terms on convert_case() by passing `number_starts_word` as false by default. ref: withoutboats#18 ref: Peternator7/strum#72
I was redirected from this issue
Peternator7/strum#72
The text was updated successfully, but these errors were encountered: