Skip to content

Commit 778d704

Browse files
committed
1 parent f21c1a3 commit 778d704

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,13 +965,13 @@ export class WorkspaceTrustEditor extends EditorPane {
965965
[
966966
localize('untrustedTasks', "Tasks are not allowed to run"),
967967
localize('untrustedDebugging', "Debugging is disabled"),
968-
localize({ key: 'untrustedExtensions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[{0} extensions]({1}) are disabled or have limited functionality", numExtensions, `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`)
968+
fixBadLocalizedLinks(localize({ key: 'untrustedExtensions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[{0} extensions]({1}) are disabled or have limited functionality", numExtensions, `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`))
969969
] :
970970
[
971971
localize('untrustedTasks', "Tasks are not allowed to run"),
972972
localize('untrustedDebugging', "Debugging is disabled"),
973-
numSettings ? localize({ key: 'untrustedSettings', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[{0} workspace settings]({1}) are not applied", numSettings, 'command:settings.filterUntrusted') : localize('no untrustedSettings', "Workspace settings requiring trust are not applied"),
974-
localize({ key: 'untrustedExtensions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[{0} extensions]({1}) are disabled or have limited functionality", numExtensions, `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`)
973+
fixBadLocalizedLinks(numSettings ? localize({ key: 'untrustedSettings', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[{0} workspace settings]({1}) are not applied", numSettings, 'command:settings.filterUntrusted') : localize('no untrustedSettings', "Workspace settings requiring trust are not applied")),
974+
fixBadLocalizedLinks(localize({ key: 'untrustedExtensions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[{0} extensions]({1}) are disabled or have limited functionality", numExtensions, `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`))
975975
];
976976
this.renderLimitationsListElement(this.untrustedContainer, untrustedContainerItems, xListIcon.classNamesArray);
977977

@@ -1109,3 +1109,9 @@ export class WorkspaceTrustEditor extends EditorPane {
11091109
this.bodyScrollBar.scanDomNode();
11101110
}
11111111
}
1112+
1113+
// Highly scoped fix for #126614
1114+
function fixBadLocalizedLinks(badString: string): string {
1115+
const regex = /(.*)\[(.+)\]\s*\((.+)\)(.*)/; // markdown link match with spaces
1116+
return badString.replace(regex, '$1[$2]($3)$4');
1117+
}

0 commit comments

Comments
 (0)