We cannot replace '-' before replacing ' ' by '-'
Closed this issue · 1 comments
Deleted user commented
I get something like this
slugify.slugify('Hola això és - * - = +', replacements=[['-','menys']])
'holamenysaixomenysesmenysmenysmenysmenys'
While I expect something like this:
hola-aixo-es-menys-menys
because I want to replace '-' by 'menys' before replacing ' ' by '-'
un33k commented
@somenxavier Pls look at the default separator parameter. replacements
is performed after separator
. It doesn't matter which one is performed first, someone will be out there that would requires the reverse order. So, I do recommend that you combine the parameters to achieve what you need the final string to be. You can also pre/post search & replace
to futher prune your string.