From 25979ab216ca2cc2539696420f23be8508d3184f Mon Sep 17 00:00:00 2001
From: Felix Nie <hongtuo.nie@u.nus.edu>
Date: Wed, 19 Mar 2025 04:43:32 +0000
Subject: [PATCH] feat(fonts): allow PageTitle to have its own font subset (#1848)
---
quartz/components/scripts/search.inline.ts | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/quartz/components/scripts/search.inline.ts b/quartz/components/scripts/search.inline.ts
index c9bbcce..1f4c009 100644
--- a/quartz/components/scripts/search.inline.ts
+++ b/quartz/components/scripts/search.inline.ts
@@ -384,7 +384,7 @@
preview.replaceChildren(previewInner)
// scroll to longest
- const highlights = [...preview.querySelectorAll(".highlight")].sort(
+ const highlights = [...preview.getElementsByClassName("highlight")].sort(
(a, b) => b.innerHTML.length - a.innerHTML.length,
)
highlights[0]?.scrollIntoView({ block: "start" })
@@ -488,7 +488,7 @@
document.addEventListener("nav", async (e: CustomEventMap["nav"]) => {
const currentSlug = e.detail.url
const data = await fetchData
- const searchElement = document.querySelectorAll(".search")
+ const searchElement = document.getElementsByClassName("search")
for (const element of searchElement) {
await setupSearch(element, currentSlug, data)
}
--
Gitblit v1.10.0