提交 9038bc7b 编写于 作者: imhuay's avatar imhuay 提交者: Matt Bierner

fix #53590 (#54257)

上级 43cdb2c6
...@@ -23,7 +23,7 @@ export const githubSlugifier: Slugifier = new class implements Slugifier { ...@@ -23,7 +23,7 @@ export const githubSlugifier: Slugifier = new class implements Slugifier {
heading.trim() heading.trim()
.toLowerCase() .toLowerCase()
.replace(/\s+/g, '-') // Replace whitespace with - .replace(/\s+/g, '-') // Replace whitespace with -
.replace(/[\]\[\!\'\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`]/g, '') // Remove known puctuators .replace(/[\]\[\!\'\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g, '') // Remove known puctuators
.replace(/^\-+/, '') // Remove leading - .replace(/^\-+/, '') // Remove leading -
.replace(/\-+$/, '') // Remove trailing - .replace(/\-+$/, '') // Remove trailing -
); );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册