-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Option to limit Slug Length #50
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: typo in comment
Hi @ntbm - thanks for this! |
The failing test is an interesting one... normally the lib won't leave trailing -'s but we are specifically asking for a max length.... |
That's why I added it. Handling all the specific edgescases will be a nightmare. So I'd vote to just accept that edge case. Question is if it be best to document it 🤔 |
Would it make sense to make the limiting a bit “smarter” so that it would not break within words if possible? For example |
If there is a fast way of doing that? I imagine you need scan back to find the last non - character within the string limit length. |
Implements #18
Added Option to Limit Output Slug Length.
Default Value is null to not introduce any breaking Changes into the Library.