1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop: Resolves #7867: Cache code blocks in notes to speed up rendering

This commit is contained in:
Laurent Cozic
2023-03-07 17:51:29 +00:00
parent 235288e903
commit 57f00c612d
2 changed files with 2 additions and 1 deletions

View File

@@ -494,7 +494,7 @@ export default class MdToHtml {
const cacheKey = md5(`${str}_${lang}`);
if (options.codeHighlightCacheKey && this.cachedHighlightedCode_[cacheKey]) {
if (options.codeHighlightCacheKey && cacheKey in this.cachedHighlightedCode_) {
hlCode = this.cachedHighlightedCode_[cacheKey];
} else {
if (lang && hljs.getLanguage(lang)) {