mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-19 20:12:52 +02:00
cheat-sheet: Allow incomplete searches
[why] Sometimes one does not know what the exact search term is. For example if you want to find a 'homefolder' but the name is 'homedirectory' it is impossible to find. [how] Allow prefix search, in this case at least 'home' will find both variants. I do believe a full substring search would be even better, but that is not supported by minisearch. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
c06a149c9c
commit
b42a1b82e6
@ -125,7 +125,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
if (searchTerm === "") {
|
||||
// MiniSearch don't allow empty searches, so we search for "nf".
|
||||
// Also it hides "nfold" (removed) icons.
|
||||
searchTerm = "nf";
|
||||
}
|
||||
|
||||
@ -135,7 +134,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
remainingSearchResults = miniSearch.search(searchTerm,
|
||||
{
|
||||
prefix: false,
|
||||
prefix: true,
|
||||
combineWith: "AND",
|
||||
boost: { isNew: 2 },
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user