diff --git a/packages/@vuepress/shared-utils/src/slugify.ts b/packages/@vuepress/shared-utils/src/slugify.ts index f386fd16e2..1a1c8dbb12 100644 --- a/packages/@vuepress/shared-utils/src/slugify.ts +++ b/packages/@vuepress/shared-utils/src/slugify.ts @@ -4,7 +4,7 @@ import { remove as removeDiacritics } from 'diacritics' // eslint-disable-next-line no-control-regex const rControl = /[\u0000-\u001f]/g -const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g +const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’–—<>,.?/]+/g export = function slugify (str: string): string { return removeDiacritics(str)