1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2025-01-04 00:08:46 +00:00
code-server-2/lib/vscode/extensions/markdown-language-features/src/commands/renderDocument.ts
Joe Previte eae5d8c807
chore(vscode): update to 1.53.2
These conflicts will be resolved in the following commits. We do it this way so
that PR review is possible.
2021-02-25 11:27:27 -07:00

21 lines
821 B
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Command } from '../commandManager';
import { MarkdownEngine } from '../markdownEngine';
import { SkinnyTextDocument } from '../tableOfContentsProvider';
export class RenderDocument implements Command {
public readonly id = 'markdown.api.render';
public constructor(
private readonly engine: MarkdownEngine
) { }
public async execute(document: SkinnyTextDocument | string): Promise<string> {
return (await (this.engine.render(document))).html;
}
}