node-slug icon indicating copy to clipboard operation
node-slug copied to clipboard

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

Open rightaway opened this issue 10 years ago • 3 comments

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

rightaway avatar Aug 24 '15 18:08 rightaway

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

are-you-crazy-----

ghost avatar Sep 29 '15 05:09 ghost

@phuyem It's simply an example.

rightaway avatar Oct 02 '15 08:10 rightaway

+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

kokokurak avatar Feb 11 '16 14:02 kokokurak