diff options
Diffstat (limited to 'src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts')
-rw-r--r-- | src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts index 522cc6346be..76d062f4c5a 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import 'vs/css!./media/extensionsWidgets'; +import * as semver from 'vs/base/common/semver/semver'; import { Disposable, toDisposable, DisposableStore, MutableDisposable, IDisposable } from 'vs/base/common/lifecycle'; import { IExtension, IExtensionsWorkbenchService, IExtensionContainer, ExtensionState, ExtensionEditorTab } from 'vs/workbench/contrib/extensions/common/extensions'; import { append, $ } from 'vs/base/browser/dom'; @@ -480,7 +481,10 @@ export class ExtensionHoverWidget extends ExtensionWidget { } const markdown = new MarkdownString('', { isTrusted: true, supportThemeIcons: true }); - markdown.appendMarkdown(`**${this.extension.displayName}** <span style="background-color:#8080802B;">** _v${this.extension.version}_** </span>`); + markdown.appendMarkdown(`**${this.extension.displayName}**`); + if (semver.valid(this.extension.version)) { + markdown.appendMarkdown(` <span style="background-color:#8080802B;">** _v${this.extension.version}_** </span>`); + } if (this.extension.state === ExtensionState.Installed ? this.extension.local?.isPreReleaseVersion : this.extension.gallery?.properties.isPreReleaseVersion) { const extensionPreReleaseIcon = this.themeService.getColorTheme().getColor(extensionPreReleaseIconColor); markdown.appendMarkdown(`** ** <span style="color:#ffffff;background-color:${extensionPreReleaseIcon ? Color.Format.CSS.formatHex(extensionPreReleaseIcon) : '#ffffff'};"> $(${preReleaseIcon.id}) ${localize('pre-release-label', "Pre-Release")} </span>`); |