-
Notifications
You must be signed in to change notification settings - Fork 252
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
Feature/regexp #45
Feature/regexp #45
Conversation
…constructor argument or by calling setRegExp
Why is the constant named |
Whoops, I meant to name it |
Ok, I get it. You meant LOWERCASE for characters, but it looks like it means lowercase numbers. Currently I don't have a better suggestion, because optimally it would be precise and short. Anyway, the regular expression means match every character that is not a lowercase letter and not a number or that is a dash. |
Yes, its not very descriptive but I meant lowercase, numbers, dashes, not lowercase numbers, but I understand the confusion. |
Finally named it |
Hmmm, it looks that the code coverage decreased. Let me fix it. |
Could you name the constant |
Done |
This allows the user to define the regular expression to be used to sanitize the slug.
It can be set either in the constructor or by calling the method
setRegExp
.By default the regular expression is the same that was being used until now.