Skip to content

Commit

Permalink
Trim characters off match instead to get key, fixes #141614 (#141818)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhao271 authored Jan 31, 2022
1 parent a853936 commit 61b42a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/workbench/contrib/preferences/browser/settingsTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?
Expand Down

0 comments on commit 61b42a3

Please sign in to comment.