Skip to content

Commit 50dc02e

Browse files
committed
minor #14003 [String] Fix missing locale in slugger substitution map (moltam)
This PR was merged into the 5.1 branch. Discussion ---------- [String] Fix missing locale in slugger substitution map The locale was missing from the substitution map, so the example code did not replace the symbols as the comment stated. Commits ------- ae0b34e [String] Fix missing locale in slugger substitution map
2 parents 136f195 + ae0b34e commit 50dc02e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/string.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ that only includes safe ASCII characters::
469469
// $slug = 'Workspace-settings'
470470

471471
// you can also pass an array with additional character substitutions
472-
$slugger = new AsciiSlugger('en', ['%' => 'percent', '€' => 'euro']);
472+
$slugger = new AsciiSlugger('en', ['en' => ['%' => 'percent', '€' => 'euro']]);
473473
$slug = $slugger->slug('10% or 5€');
474474
// $slug = '10-percent-or-5-euro'
475475

0 commit comments

Comments
 (0)