Skip to content

Fix for the Table of Contents (fix #2896) #2897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
I did RegExp yet more precise
  • Loading branch information
wszymanski authored Jul 15, 2021
commit 60c288e7c9e4ab0cab9d9caa6c46d7a4ac5faaec
2 changes: 1 addition & 1 deletion packages/@vuepress/shared-utils/src/slugify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export = function slugify (str: string): string {
// Split accented characters into components
return str.normalize('NFKD')
// Remove links, just leave hyperlink's text
.replace(/\[(.*)?]\(.*?\)/g,'$1')
.replace(/^\[(.*)?(]\(.*?\))$/g,'$1')
// Remove accents
.replace(rCombining, '')
// Remove control characters
Expand Down