mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
@@ -129,7 +129,6 @@ export class MarkdownEngine {
|
||||
}
|
||||
|
||||
this.currentDocument = document.uri;
|
||||
this._slugCount = new Map<string, number>();
|
||||
|
||||
const tokens = this.tokenizeString(document.getText(), engine);
|
||||
this._tokenCache.update(document, config, tokens);
|
||||
@@ -137,6 +136,8 @@ export class MarkdownEngine {
|
||||
}
|
||||
|
||||
private tokenizeString(text: string, engine: MarkdownIt) {
|
||||
this._slugCount = new Map<string, number>();
|
||||
|
||||
return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {});
|
||||
}
|
||||
|
||||
@@ -355,4 +356,3 @@ function normalizeHighlightLang(lang: string | undefined) {
|
||||
return lang;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user