1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Chore: Merge release-2.13 into dev (#9698)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
Henry Heino 2024-01-11 13:22:52 -08:00 committed by GitHub
parent 150ee7631e
commit 97a04ea9e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,11 @@ interface RenderOptions {
itemIdToUrl?: ItemIdToUrlHandler;
allowedFilePrefixes?: string[];
whiteBackgroundNoteRendering?: boolean;
// For compatibility with MdToHtml options:
plugins?: {
link_open?: { linkRenderingType?: number };
};
}
// https://github.com/es-shims/String.prototype.trimStart/blob/main/implementation.js
@ -107,7 +112,7 @@ export default class HtmlToHtml {
...options,
};
const cacheKey = md5(escape(markup));
const cacheKey = md5(escape(JSON.stringify({ markup, options })));
let html = this.cache_.value(cacheKey);
if (!html) {
@ -142,6 +147,7 @@ export default class HtmlToHtml {
ResourceModel: this.ResourceModel_,
postMessageSyntax: options.postMessageSyntax,
enableLongPress: options.enableLongPress,
...options.plugins?.link_open,
});
if (!r.html) return null;