Closed Redlinkk closed 2 years ago
@Redlinkk Thank you for catching this, I added more tests, fixed one more problem and merged it. Now it's part of v1.13.0 release.
I actually found another case I described here https://github.com/gosimple/slug/issues/76
When using the truncate function, the slug can be longer than
MaxLength
on specific conditions. See this example:Current function fails on this edge case because the last word doesn't end with a "-" during the max length test here so the
- 1
is wrongfully applied.