This commit is contained in:
Jean Pierre 2020-07-29 17:31:50 -05:00 committed by GitHub
parent 2ed1fe8e22
commit f732547a3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}