mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
make search a bit fuzzier
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user