Skip to content

Commit 9a7d3f9

Browse files
committed
Fix copy pasted code in diff element outputs
1 parent 8d8dfae commit 9a7d3f9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,20 @@ export class OutputElement extends Disposable {
128128

129129
private _renderSearchForMimetype(viewModel: ICellOutputViewModel, mimeType: string): IInsetRenderOutput {
130130
const query = `@tag:notebookRenderer ${mimeType}`;
131+
132+
const p = DOM.$('p', undefined, `No renderer could be found for mimetype "${mimeType}", but one might be available on the Marketplace.`);
133+
const a = DOM.$('a', { href: `command:workbench.extensions.search?%22${query}%22`, class: 'monaco-button monaco-text-button', tabindex: 0, role: 'button', style: 'padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;' }, `Search Marketplace`);
134+
131135
return {
132136
type: RenderOutputType.Html,
133137
source: viewModel,
134-
htmlContent: `<p>No renderer could be found for mimetype "${mimeType}", but one might be available on the Marketplace.</p>
135-
<a href="command:workbench.extensions.search?%22${query}%22" class="monaco-button monaco-text-button" tabindex="0" role="button" style="padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;">Search Marketplace</a>`
138+
htmlContent: p.outerHTML + a.outerHTML,
136139
};
137140
}
138141

139142
private _renderMessage(viewModel: ICellOutputViewModel, message: string): IInsetRenderOutput {
140-
return { type: RenderOutputType.Html, source: viewModel, htmlContent: `<p>${message}</p>` };
143+
const el = DOM.$('p', undefined, message);
144+
return { type: RenderOutputType.Html, source: viewModel, htmlContent: el.outerHTML };
141145
}
142146

143147
private async pickActiveMimeTypeRenderer(notebookTextModel: NotebookTextModel, viewModel: ICellOutputViewModel) {

0 commit comments

Comments
 (0)