From 6d8bd3a58fd1e61dccdf8d959683910fd24f9646 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Sun, 10 Mar 2024 01:14:31 +0100 Subject: [PATCH] fix(transclusion): prevent duplicate transclusion if multiple transclusions are present. (#982) --- quartz/components/renderPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index 0c185444..251a53f2 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -118,11 +118,12 @@ export function renderPage( // skip until we find the blockref that matches if (el.properties?.id === blockRef) { startIdx = i - startDepth = Number(el.tagName.substring(1)) + startDepth = depth } } else if (depth <= startDepth) { // looking for new header that is same level or higher endIdx = i + break } }