mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Desktop: Resolves #7867: Cache code blocks in notes to speed up rendering
This commit is contained in:
parent
235288e903
commit
57f00c612d
@ -62,6 +62,7 @@ export default function useMarkupToHtml(deps: HookDependencies) {
|
||||
postMessageSyntax: 'ipcProxySendToHost',
|
||||
splitted: true,
|
||||
externalAssetsOnly: true,
|
||||
codeHighlightCacheKey: 'useMarkupToHtml',
|
||||
}, options));
|
||||
|
||||
return result;
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user