Skip to content

Commit 19f9f60

Browse files
authored
Correctly reload markdown preview on md contribution change (microsoft#188218)
Fixes microsoft#184295
1 parent f32187d commit 19f9f60

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

extensions/markdown-language-features/src/markdownEngine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export class MarkdownItEngine implements IMdParser {
114114
_contributionProvider.onContributionsChanged(() => {
115115
// Markdown plugin contributions may have changed
116116
this._md = undefined;
117+
this._tokenCache.clean();
117118
});
118119
}
119120

extensions/markdown-language-features/src/preview/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
9595
}
9696

9797
this._register(_contributionProvider.onContributionsChanged(() => {
98-
setTimeout(() => this.refresh(), 0);
98+
setTimeout(() => this.refresh(true), 0);
9999
}));
100100

101101
this._register(vscode.workspace.onDidChangeTextDocument(event => {

0 commit comments

Comments
 (0)