mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 21:11:38 +01:00
re-rendering Markdown preview when updated extra configurations provided by extension
This commit is contained in:
@@ -47,6 +47,11 @@ class TokenCache {
|
||||
};
|
||||
this.tokens = tokens;
|
||||
}
|
||||
|
||||
public clean(): void {
|
||||
this.cachedDocument = undefined;
|
||||
this.tokens = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export class MarkdownEngine {
|
||||
@@ -147,6 +152,10 @@ export class MarkdownEngine {
|
||||
return this.tokenize(document, config, engine);
|
||||
}
|
||||
|
||||
public cleanCache(): void {
|
||||
this._tokenCache.clean();
|
||||
}
|
||||
|
||||
private getConfig(resource: vscode.Uri): MarkdownItConfig {
|
||||
const config = vscode.workspace.getConfiguration('markdown', resource);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user