diff --git a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts index 6a132a713fae3..464d79af8b839 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts @@ -2130,7 +2130,8 @@ function cleanRenderedMarkdown(element: Node): void { } function fixSettingLinks(text: string, linkify = true): string { - return text.replace(/`#([^#]*)#`|'#([^#]*)#'/g, (match, settingKey) => { + return text.replace(/`#([^#]*)#`|'#([^#]*)#'/g, (match) => { + const settingKey = match.substring(2, match.length - 2); const targetDisplayFormat = settingKeyToDisplayFormat(settingKey); const targetName = `${targetDisplayFormat.category}: ${targetDisplayFormat.label}`; return linkify ?