1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2025-01-08 17:38:44 +00:00
code-server-2/lib/vscode/extensions/markdown-language-features/src/commands/refreshPreview.ts

22 lines
842 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 { MarkdownPreviewManager } from '../features/previewManager';
import { MarkdownEngine } from '../markdownEngine';
export class RefreshPreviewCommand implements Command {
public readonly id = 'markdown.preview.refresh';
public constructor(
private readonly webviewManager: MarkdownPreviewManager,
private readonly engine: MarkdownEngine
) { }
public execute() {
this.engine.cleanCache();
this.webviewManager.refresh();
}
}