make search a bit fuzzier

This commit is contained in:
Cory LaViska
2021-09-17 16:27:11 -04:00
parent 185fc4c942
commit 7e6c6924f2

View File

@@ -221,7 +221,7 @@
await searchIndex;
const hasQuery = query.length > 0;
const matches = hasQuery ? searchIndex.search(`${query}~1`) : [];
const matches = hasQuery ? searchIndex.search(`${query}~2`) : [];
let hasResults = hasQuery && matches.length > 0;
siteSearch.classList.toggle('site-search--has-results', hasQuery && hasResults);