mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Allow underscores in rendered md headers (#161149)
Follow up from https://github.com/microsoft/vscode-markdown-languageservice/pull/49
This commit is contained in:
parent
4c9c3f628d
commit
a10bdfb49b
|
@ -24,7 +24,7 @@ export const githubSlugifier: Slugifier = new class implements Slugifier {
|
|||
.toLowerCase()
|
||||
.replace(/\s+/g, '-') // Replace whitespace with -
|
||||
// allow-any-unicode-next-line
|
||||
.replace(/[\]\[\!\/\'\"\#\$\%\&\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g, '') // Remove known punctuators
|
||||
.replace(/[\]\[\!\/\'\"\#\$\%\&\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g, '') // Remove known punctuators
|
||||
.replace(/^\-+/, '') // Remove leading -
|
||||
.replace(/\-+$/, '') // Remove trailing -
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue