mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
22 lines
850 B
TypeScript
22 lines
850 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 { MarkdownItEngine } from '../markdownEngine';
|
|
import { MarkdownPreviewManager } from '../preview/previewManager';
|
|
|
|
export class RefreshPreviewCommand implements Command {
|
|
public readonly id = 'markdown.preview.refresh';
|
|
|
|
public constructor(
|
|
private readonly _webviewManager: MarkdownPreviewManager,
|
|
private readonly _engine: MarkdownItEngine
|
|
) { }
|
|
|
|
public execute() {
|
|
this._engine.cleanCache();
|
|
this._webviewManager.refresh();
|
|
}
|
|
}
|