mirror of
https://github.com/flarum/core.git
synced 2025-07-09 19:06:23 +02:00
No slug? Then no '-' separator! (#1351)
* Stop using slug separator when there is no slug * Changing as per upstream requirements
This commit is contained in:
committed by
Toby Zerner
parent
c3a6f7daef
commit
7721288ac6
@ -23,7 +23,7 @@ export function slug(string) {
|
||||
return string.toLowerCase()
|
||||
.replace(/[^a-z0-9]/gi, '-')
|
||||
.replace(/-+/g, '-')
|
||||
.replace(/-$|^-/g, '') || '-';
|
||||
.replace(/-$|^-/g, '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user