From 16facd8645cbf440b45313797cd53946c0a0897d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 16 Jun 2021 14:53:25 +0200 Subject: [PATCH] relax supportThemeIcons --- src/vs/vscode.d.ts | 6 +++--- src/vs/workbench/api/common/extHostTypes.ts | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 7064bbcd593..46fac88b39f 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -2569,8 +2569,8 @@ declare module 'vscode' { * The MarkdownString represents human-readable text that supports formatting via the * markdown syntax. Standard markdown is supported, also tables, but no embedded html. * - * When created with `supportThemeIcons` then rendering of {@link ThemeIcon theme icons} via - * the `$()`-syntax is supported. + * Rendering of {@link ThemeIcon theme icons} via the `$()`-syntax is supported + * when the {@link MarkdownString.supportThemeIcons `supportThemeIcons`} is set to `true`. */ export class MarkdownString { @@ -2588,7 +2588,7 @@ declare module 'vscode' { /** * Indicates that this markdown string can contain {@link ThemeIcon ThemeIcons}, e.g. `$(zap)`. */ - readonly supportThemeIcons?: boolean; + supportThemeIcons?: boolean; /** * Creates a new markdown string with the given value. diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index 54ba8c1e240..cff5b2a56c9 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -1332,6 +1332,10 @@ export class MarkdownString implements vscode.MarkdownString { return this.#delegate.supportThemeIcons; } + set supportThemeIcons(value: boolean | undefined) { + this.#delegate.supportThemeIcons = value; + } + appendText(value: string): vscode.MarkdownString { this.#delegate.appendText(value); return this;