Skip to content

Commit 74c836d

Browse files
authored
Update Util.php
1 parent 5eebc54 commit 74c836d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Util.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,12 @@ public static function is_cli() {
325325
* @param string $text input
326326
* @return string output
327327
*/
328-
public static function slugify($text, $lowercase = true, $skip_chars = '') {
328+
public static function slugify($text, $lowercase = true, $skip_chars = '', $replace = '-') {
329329

330330
// replace non letter or digits by -
331-
$text = preg_replace('~[^\\pL\d'.$skip_chars.']+~u', '-', $text);
331+
$text = preg_replace('~[^\\pL\d'.$skip_chars.']+~u', $replace, $text);
332332
// trim
333-
$text = trim($text, '-');
333+
$text = trim($text, $replace);
334334
// transliterate
335335
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
336336
// lowercase

0 commit comments

Comments
 (0)