Skip to content

Commit 4881c1c

Browse files
committed
fix: Update fallbackGeneric method to allow **hyphens** in transliteration
1 parent 0787cfc commit 4881c1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Content/DefaultSlugGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private static function fallbackJapanese($text, $separator)
138138

139139
private static function fallbackGeneric($text, $separator)
140140
{
141-
$result = preg_replace('/[^a-zA-Z0-9\s]/', '', $text);
141+
$result = preg_replace('/[^a-zA-Z0-9\s\-]/', '', $text);
142142
$result = preg_replace('/\s+/', $separator, $result);
143143

144144
return strtolower(trim($result, $separator));

0 commit comments

Comments
 (0)