diff --git a/src/sql/workbench/services/tableDesigner/browser/tableDesignerPublishDialog.ts b/src/sql/workbench/services/tableDesigner/browser/tableDesignerPublishDialog.ts index 05b7efd265..ac01232439 100644 --- a/src/sql/workbench/services/tableDesigner/browser/tableDesignerPublishDialog.ts +++ b/src/sql/workbench/services/tableDesigner/browser/tableDesignerPublishDialog.ts @@ -18,6 +18,8 @@ import { ITextResourcePropertiesService } from 'vs/editor/common/services/textRe import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry'; import { attachModalDialogStyler } from 'sql/workbench/common/styler'; import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { MarkdownRenderer } from 'vs/editor/browser/core/markdownRenderer'; const OkText: string = localize('tableDesigner.UpdateDatabase', "Update Database"); const CancelText: string = localize('tableDesigner.cancel', "Cancel"); @@ -36,6 +38,7 @@ export class TableDesignerPublishDialog extends Modal { private _generateScriptButton?: Button; private _cancelButton?: Button; private _promiseResolver: (value: TableDesignerPublishDialogResult) => void; + private readonly _markdownRenderer: MarkdownRenderer; constructor( @IThemeService themeService: IThemeService, @@ -44,9 +47,11 @@ export class TableDesignerPublishDialog extends Modal { @IAdsTelemetryService telemetryService: IAdsTelemetryService, @IContextKeyService contextKeyService: IContextKeyService, @ILogService logService: ILogService, - @ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService + @ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService, + @IInstantiationService instantiationService: IInstantiationService ) { super('', TelemetryKeys.ModalDialogName.TableDesignerPublishDialog, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'normal', hasTitleIcon: false }); + this._markdownRenderer = instantiationService.createInstance(MarkdownRenderer, {}); } public open(report: string): Promise { @@ -73,7 +78,8 @@ export class TableDesignerPublishDialog extends Modal { protected renderBody(container: HTMLElement) { const body = DOM.append(container, DOM.$('.table-designer-publish-dialog')); - body.innerText = this._report; + const markdownElement = this._markdownRenderer.render({ value: this._report }).element; + DOM.append(body, markdownElement); } protected layout(height?: number): void {