Skip to content

Commit

Permalink
Correctly reload markdown preview on md contribution change
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Jul 18, 2023
1 parent e9af68e commit 87977e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class MarkdownItEngine implements IMdParser {
_contributionProvider.onContributionsChanged(() => {
// Markdown plugin contributions may have changed
this._md = undefined;
this._tokenCache.clean();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
}

this._register(_contributionProvider.onContributionsChanged(() => {
setTimeout(() => this.refresh(), 0);
setTimeout(() => this.refresh(true), 0);
}));

this._register(vscode.workspace.onDidChangeTextDocument(event => {
Expand Down

0 comments on commit 87977e7

Please sign in to comment.