From e6a56e8031c7e9c38e98dfbd5cd37210d449823b Mon Sep 17 00:00:00 2001 From: David Porter Date: Sun, 23 Feb 2020 21:51:19 +1000 Subject: [PATCH] fix($shared-utils): Slugify em/en dash in urls (#2174) --- packages/@vuepress/shared-utils/src/slugify.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)