1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +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

View File

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