From 1272950597080a306a218884a2c189fc13f48529 Mon Sep 17 00:00:00 2001 From: xiangyu <3170102889@zju.edu.cn> Date: Wed, 31 Aug 2022 19:15:53 +0800 Subject: [PATCH] fix: export note with math(Zotero 6.14) --- .../content/translators/Better Note Markdown.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addon/chrome/content/translators/Better Note Markdown.js b/addon/chrome/content/translators/Better Note Markdown.js index f1ec151..479a79c 100644 --- a/addon/chrome/content/translators/Better Note Markdown.js +++ b/addon/chrome/content/translators/Better Note Markdown.js @@ -690,6 +690,20 @@ let bundle; }, }; + rules.mathBlock = { + filter: function (node) { + return node.nodeName === "PRE" && node.className === "math"; + }, + + replacement: function (content, node, options) { + return ( + "\n\n$$\n" + + node.firstChild.textContent.slice(2, -2) + + "\n$$\n\n" + ); + }, + }; + rules.indentedCodeBlock = { filter: function (node, options) { return (