Skip to content

Commit

Permalink
Fixes #103076 (#103578)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 committed Jul 29, 2020
1 parent 2ed1fe8 commit f732547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/markdown-language-features/src/markdownEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,15 @@ 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);
return tokens;
}

private tokenizeString(text: string, engine: MarkdownIt) {
this._slugCount = new Map<string, number>();

return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {});
}

Expand Down Expand Up @@ -355,4 +356,3 @@ function normalizeHighlightLang(lang: string | undefined) {
return lang;
}
}

0 comments on commit f732547

Please sign in to comment.