From 6486609a05ddd7798fb2b61aa419076dd2da7b24 Mon Sep 17 00:00:00 2001 From: Max Kondratev Date: Sat, 9 Mar 2024 21:55:08 +0300 Subject: [PATCH] fix(search): set search type to basic and remove tag from term for proper highlightning and scroll when searched by tag and title/content index --- quartz/components/scripts/search.inline.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quartz/components/scripts/search.inline.ts b/quartz/components/scripts/search.inline.ts index e46ab2479395d..e44cbfa50c6f2 100644 --- a/quartz/components/scripts/search.inline.ts +++ b/quartz/components/scripts/search.inline.ts @@ -421,6 +421,9 @@ document.addEventListener("nav", async (e: CustomEventMap["nav"]) => { for (let searchResult of searchResults) { searchResult.result = searchResult.result.slice(0, numSearchResults) } + // set search type to basic and remove tag from term for proper highlightning and scroll + searchType = "basic" + currentSearchTerm = query } else { // default search by tags index searchResults = await index.searchAsync({