Skip to content

Commit f732547

Browse files
authored
1 parent 2ed1fe8 commit f732547

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,15 @@ export class MarkdownEngine {
129129
}
130130

131131
this.currentDocument = document.uri;
132-
this._slugCount = new Map<string, number>();
133132

134133
const tokens = this.tokenizeString(document.getText(), engine);
135134
this._tokenCache.update(document, config, tokens);
136135
return tokens;
137136
}
138137

139138
private tokenizeString(text: string, engine: MarkdownIt) {
139+
this._slugCount = new Map<string, number>();
140+
140141
return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {});
141142
}
142143

@@ -355,4 +356,3 @@ function normalizeHighlightLang(lang: string | undefined) {
355356
return lang;
356357
}
357358
}
358-

0 commit comments

Comments
 (0)