mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
parent
2ed1fe8e22
commit
f732547a3d
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue