Skip to content

Commit 61b42a3

Browse files
authored
Trim characters off match instead to get key, fixes microsoft#141614 (microsoft#141818)
1 parent a853936 commit 61b42a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/workbench/contrib/preferences/browser/settingsTree.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,8 @@ function cleanRenderedMarkdown(element: Node): void {
21302130
}
21312131

21322132
function fixSettingLinks(text: string, linkify = true): string {
2133-
return text.replace(/`#([^#]*)#`|'#([^#]*)#'/g, (match, settingKey) => {
2133+
return text.replace(/`#([^#]*)#`|'#([^#]*)#'/g, (match) => {
2134+
const settingKey = match.substring(2, match.length - 2);
21342135
const targetDisplayFormat = settingKeyToDisplayFormat(settingKey);
21352136
const targetName = `${targetDisplayFormat.category}: ${targetDisplayFormat.label}`;
21362137
return linkify ?

0 commit comments

Comments
 (0)