dodo / node-slug

slugifies even utf-8 chars!
MIT License
1.08k stars 92 forks source link

Turn characters like ?, @, # to hyphen instead of just removing them #46

Open rightaway opened 9 years ago

rightaway commented 9 years ago

Right now aaa??@#bbb becomes aaabbb, generated slug would be more readable if it were to become aaa-bbb.

ghost commented 8 years ago

why the hell is there aaa??@#bb in slug ??

are-you-crazy-----

rightaway commented 8 years ago

@phuyem It's simply an example.

kokokurak commented 8 years ago

+1 for this! There should always be separator for any removed/replaced characters. Another example:

aaa&&&&bbb

Turns into:

aaaandandaaa

But I believe the better result would be this:

aaa-and-and-and-and-bbb