From 041f4cd3bcdc016d6f562af2da5d7de0f8878943 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 2 Dec 2022 16:06:55 +0100 Subject: [PATCH] fix https://github.com/microsoft/vscode/issues/167321 (#167935) --- src/vs/base/browser/ui/iconLabel/iconLabel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/iconLabel/iconLabel.ts b/src/vs/base/browser/ui/iconLabel/iconLabel.ts index fd9f321a7d9..599abeaf6a1 100644 --- a/src/vs/base/browser/ui/iconLabel/iconLabel.ts +++ b/src/vs/base/browser/ui/iconLabel/iconLabel.ts @@ -147,10 +147,10 @@ export class IconLabel extends Disposable { if (description || this.descriptionNode) { const descriptionNode = this.getOrCreateDescriptionNode(); if (descriptionNode instanceof HighlightedLabel) { - descriptionNode.set(description || '', options ? options.descriptionMatches : undefined); + descriptionNode.set(description || '', options ? options.descriptionMatches : undefined, undefined, options?.labelEscapeNewLines); this.setupHover(descriptionNode.element, options?.descriptionTitle); } else { - descriptionNode.textContent = description || ''; + descriptionNode.textContent = description && options?.labelEscapeNewLines ? HighlightedLabel.escapeNewLines(description, []) : (description || ''); this.setupHover(descriptionNode.element, options?.descriptionTitle || ''); descriptionNode.empty = !description; }