Skip to content

Conversation

@asakasinsky
Copy link

Problem:
if the "text" value passed to "slugify" function consist only non-latin characters (cyrillic, for example), regular expression match === null. And we get an error on "join('-')".
Solution:
I assigned to match result (if match===null) a timestamp. This solution a little bad for the semantics, but completely solve the problem

if the "text" value passed to "slugify" function consist only non-latin characters (cyrillic, for example), regular expression match === null. And we get an error on "join('-')".
@Akurganow
Copy link

I have the same problem

@kerim
Copy link

kerim commented Sep 9, 2013

I'm having this problem now. I see that a solution has been offered, but I'm not sure how to implement this solution locally (since it doesn't seem to have been updated in the code yet)?

@andrewkharook
Copy link

This solution fixes the page display but menu in sidebar still does not work correctly.

@rstacruz
Copy link
Owner

rstacruz commented Nov 9, 2014

Thanks, I think the better solution is to use .toLowerCase().replace(/[_ \(\)\[\]]/g, '-') or similar.

@lifehome lifehome mentioned this pull request Apr 29, 2015
@rstacruz rstacruz mentioned this pull request Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants