Skip to content

Commit

Permalink
[4.x] Fix slugify when using hyphens surrounded by spaces. (#8923)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Nov 3, 2023
1 parent 5d65ec9 commit 09ce7d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/js/plugins/slugify.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default {
// Remove smart single quotes
custom["’"] = "";

// Prevent `Block - Hero` turning into `block_-_hero`
custom[" - "] = " ";

return getSlug(text, {
separator: glue || '-',
lang,
Expand Down

0 comments on commit 09ce7d4

Please sign in to comment.