Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/markdown-language-features/src/commands/refreshPreview.ts
3294 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Command } from '../commandManager';
7
import { MarkdownItEngine } from '../markdownEngine';
8
import { MarkdownPreviewManager } from '../preview/previewManager';
9
10
export class RefreshPreviewCommand implements Command {
11
public readonly id = 'markdown.preview.refresh';
12
13
public constructor(
14
private readonly _webviewManager: MarkdownPreviewManager,
15
private readonly _engine: MarkdownItEngine
16
) { }
17
18
public execute() {
19
this._engine.cleanCache();
20
this._webviewManager.refresh();
21
}
22
}
23
24