mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 09:35:39 -05:00
20 lines
801 B
TypeScript
20 lines
801 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
import * as vscode from 'vscode';
|
|
|
|
import { Command } from '../commandManager';
|
|
import { MarkdownEngine } from '../markdownEngine';
|
|
|
|
export class ShowNotebookPreview implements Command {
|
|
public readonly id = 'notebook.showPreview';
|
|
|
|
public constructor(
|
|
private readonly engine: MarkdownEngine
|
|
) { }
|
|
|
|
public async execute(document: vscode.Uri, textContent: string): Promise<string> {
|
|
return this.engine.renderText(document, textContent);
|
|
}
|
|
} |