Skip to content

Commit

Permalink
fix(search): set search type to basic and remove tag from term for pr…
Browse files Browse the repository at this point in the history
…oper highlightning and scroll when searched by tag and title/content index
  • Loading branch information
makondratev committed Mar 9, 2024
1 parent abb1cee commit 6486609
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions quartz/components/scripts/search.inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 6486609

Please sign in to comment.