From e09ccc3ac46957f4f93da2cfee9149cca153eb02 Mon Sep 17 00:00:00 2001 From: Tron Date: Sun, 1 Dec 2024 23:04:35 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20v1.1.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index fc01853..1501d20 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1094,11 +1094,10 @@ export default class PluginFootnote extends Plugin { const renderedTemplate = await renderTemplates(templates); // Update block content - + const existingAttrs = await getBlockAttrs(newBlockId); await updateBlock("markdown", renderedTemplate, newBlockId); - // Restore block attributes that could have been reset by updateBlock - const existingAttrs = await getBlockAttrs(newBlockId); + if (existingAttrs) { await setBlockAttrs(newBlockId, { "custom-plugin-footnote-content": existingAttrs["custom-plugin-footnote-content"],