diff --git a/packages/renderer/HtmlToHtml.ts b/packages/renderer/HtmlToHtml.ts
index c424736a0..552d12a4c 100644
--- a/packages/renderer/HtmlToHtml.ts
+++ b/packages/renderer/HtmlToHtml.ts
@@ -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;