From 85a737b4ee72fb4dba12e1aacbd87d1636cfc30e Mon Sep 17 00:00:00 2001
From: Xinyang Yu <47915643+xy-241@users.noreply.github.com>
Date: Sun, 24 Mar 2024 16:33:53 +0000
Subject: [PATCH] docs: Update showcase.md (#1031)
---
quartz/components/renderPage.tsx | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx
index 7a97edb..251a53f 100644
--- a/quartz/components/renderPage.tsx
+++ b/quartz/components/renderPage.tsx
@@ -118,11 +118,12 @@
// 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
}
}
@@ -209,7 +210,7 @@
</div>
)
- const lang = componentData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
+ const lang = componentData.fileData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
const doc = (
<html lang={lang}>
<Head {...componentData} />
--
Gitblit v1.10.0