Correctly reload markdown preview on md contribution change (#188218)

Fixes #184295
This commit is contained in:
Matt Bierner 2023-07-18 16:47:31 -07:00 committed by GitHub
parent f32187dfe7
commit 19f9f605a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -114,6 +114,7 @@ export class MarkdownItEngine implements IMdParser {
_contributionProvider.onContributionsChanged(() => {
// Markdown plugin contributions may have changed
this._md = undefined;
this._tokenCache.clean();
});
}

View file

@ -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 => {