You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding of kebab case (and other cases) is that punctation should be removed and consecutive punctation is collapsed into one hyphen. This is for example what lodash does for their string conversion suite and this definition of kebab case seems supported by this project's own comment link to Wikipedia.
So for one I wanted to ask to clarify on what is the correct behavior. If punctuation should be preserved then the link to Wikipedia should be removed as it does not describe the functionality of the functions implemented by this project. If they should be removed then I'm happy to submit a PR changing this and updating the tests.
In case it is helpful the use case I have is generating urls for titles (user generated) and preserving punctation is of course problematic for urls.
The text was updated successfully, but these errors were encountered:
From the Wikipedia page linked from kebab_case.ex it says "As per snake_case above" and in the snake_case section above it says "Punctuation is removed and spaces are replaced..." However it looks like in this project's tests for kebab_case it seems to intentionally test for preservation of punctuation https://github.com/sobolevn/recase/blob/master/test/recase_test/kebab_case_test.exs#L18
My understanding of kebab case (and other cases) is that punctation should be removed and consecutive punctation is collapsed into one hyphen. This is for example what lodash does for their string conversion suite and this definition of kebab case seems supported by this project's own comment link to Wikipedia.
So for one I wanted to ask to clarify on what is the correct behavior. If punctuation should be preserved then the link to Wikipedia should be removed as it does not describe the functionality of the functions implemented by this project. If they should be removed then I'm happy to submit a PR changing this and updating the tests.
In case it is helpful the use case I have is generating urls for titles (user generated) and preserving punctation is of course problematic for urls.
The text was updated successfully, but these errors were encountered: