Skip to content

Commit 6778483

Browse files
committed
Move token to be last argument
1 parent 9140c8e commit 6778483

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/vs/workbench/contrib/extensions/browser/extensionEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ export class ExtensionEditor extends EditorPane {
750750
return '';
751751
}
752752

753-
const content = await renderMarkdownDocument(contents, this.extensionService, this.languageService, { shouldSanitize: extension.type !== ExtensionType.System, token });
753+
const content = await renderMarkdownDocument(contents, this.extensionService, this.languageService, { shouldSanitize: extension.type !== ExtensionType.System }, token);
754754
if (token?.isCancellationRequested) {
755755
return '';
756756
}

src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ interface IRenderMarkdownDocumentOptions {
192192
readonly shouldSanitize?: boolean;
193193
readonly allowUnknownProtocols?: boolean;
194194
readonly markedExtensions?: marked.MarkedExtension[];
195-
readonly token?: CancellationToken;
196195
}
197196

198197
/**
@@ -204,7 +203,8 @@ export async function renderMarkdownDocument(
204203
text: string,
205204
extensionService: IExtensionService,
206205
languageService: ILanguageService,
207-
options?: IRenderMarkdownDocumentOptions
206+
options?: IRenderMarkdownDocumentOptions,
207+
token?: CancellationToken,
208208
): Promise<string> {
209209
const m = new marked.Marked(
210210
MarkedHighlight.markedHighlight({
@@ -215,7 +215,7 @@ export async function renderMarkdownDocument(
215215
}
216216

217217
await extensionService.whenInstalledExtensionsRegistered();
218-
if (options?.token?.isCancellationRequested) {
218+
if (token?.isCancellationRequested) {
219219
return '';
220220
}
221221

src/vs/workbench/contrib/mcp/browser/mcpServerEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ export class McpServerEditor extends EditorPane {
529529
return '';
530530
}
531531

532-
const content = await renderMarkdownDocument(contents, this.extensionService, this.languageService, { shouldSanitize: true, token });
532+
const content = await renderMarkdownDocument(contents, this.extensionService, this.languageService, { shouldSanitize: true }, token);
533533
if (token?.isCancellationRequested) {
534534
return '';
535535
}

0 commit comments

Comments
 (0)